Definition of XML Technologies
XML technologies are defined as processing the XML application and to build a web different XML variants are used in the XML document to process the activities. Extensible Mark-up Language (XML) is a modern Mark-up language with platform-independent that why it’s been popular as it adapts to new technologies and supports a wide variety of applications. The main reason is XML supports Unicode as it is easy to communicate if written in human language. With efficient data sharing, any new programming languages can read and process an XML file.
Various XML Technologies with Examples
In this section, we shall see an overview of XML related technologies. Here is the list of technologies:
1. Document Type Definition
DTD declaration has both inline and external references to define the XML document. The main purpose of using DTD is to verify the data while sharing as XML provides a dependent way of sharing data in their applications. Sample Example is given below:
<!DOCTYPE project [
<!ELEMENT project (Name,Type,country,description>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Type (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT description (#PCDATA)>
< description >Have a fun !</ description >
2. Extensible HTML
It is very similar to HTML with some advanced restrictions. They are well-formed and the document is parsed using XML Unlike HTML, all the tags and attributes should be written in lowercases. The key benefit of XHTML is it has more strict syntax rules and greater accessibility. XHTML document includes doctype, body, and head. Sample Example is given below:
<?xml version="1.0" encoding="UTF-8"?>
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title> XHTML Example </title>
3. XML Schema Definition
Schema provides a template for an XML file. In the context of XML, schema describes what type of format should element and attributes in the XML file.XML schema overcomes the limitation of DTD where they lack namespaces and rich datatypes. The files are saved using the suffix .xsd extension. They define Simple and complex types. Some applications like E-Commerce are made simpler by using XSD schemas. Sample Example is given below:
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:element name = "banking">
<xs:element name = "sector name" type = "xs:string" />
<xs:element name = "branch" type = "xs:string" />
<xs:element name = "contact" type = "xs:int" />
4. Extensible Style Sheet Language Transformations(XSLT)
XSLT is written in XML a styling language like CSS in html and does the job of transforming an XML documents into other formats. Having this UI script is easier to maintain. Sample Example is given below:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="hi ">
5. XML DOM
Document Object Model is a standard programming API for XML through which the programming language could connect to the web pages and defines the document in a tree – hierarchy structure in which documents are designed by the objects(window, form, link). Using interface like COM Xml Parser are created. Sample Example is given below:
//body of the statements
parser = new DOMParser();
xmlDoc = parser.parseFromString(text,"text/xml");
X-path uses Path expression which allows computations resulting in values like strings, Boolean thereby tells the path and address of XML data files also compute values. The Xpath facilitates syntax shared between XSLT and Xpointer and navigates through the tree to select the respective nodes in a particular direction to meet certain properties using (/) to traversal a node.
It’s an XSl Formatting Objects, defined as Stylesheet applications to format XML data for the output. Sample Example is given below:
<fo:wrapper font-size="10pt" font-weight="bold">
Cream with choclates
Xml Linking language is primarily used for hyperlinking functionality in XML Documents. They are represented using elements, type,href.
<?xml version = "1.0" encoding = "utf-8" ?>
<cafed xmlns:xlink = "http://www.w3.org/1999/xlink" >
<cafe name = "bdown" >
xlink:type = "action"
xlink:href = "http://cafe.com/cafed/bdown.avi" >
XML Pointer language points out certain parts of xml documents using hyperlinks. They typically address xml part media through links. To point out a specific parts include (#) symbol with the Xpointer expression.
xlink:href = "http://www.cafed.com/cafedata.xml#xpointer(id('php'))"
It is used to describe a form of data and does manipulation and validations of a form.
<?xml version="1.0" encoding="UTF-8"?>
<title> Form demo XML</title>
It defines a Query collection of XML documents. It takes XPath +Query language like SQL. It takes XML has a data model to express complex queries. Uses FLWR expression.
for $x in doc("cafed.xml")/cafe/menu
12. SOAP (Simple Object Access Protocol )
It is a communication protocol used for XML Messaging. The key focus is on remote procedure calls for broadcasting a message via HTTP.SOAP is widespread in java, web services and dot net. So, SOAP is defined to be as a mechanism for information exchange with the help of XML ad HTTP the communication of the program from one operating system to another operating system takes place. Its working is very simple As SOAP request/response is done through HTTP Protocol through which the client request is made with XML Messaging to the server and the XML response is sent back to the client where it parses and returns the value. Sample Example is given below:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope" SOAP-ENV:encodingStyle=" http://www.w3.org/2001/12/soap-encoding">
</ SOAPSample >
13. WSDL ( (Web Services Description Language))
Web service Description Language is XML based file used to describe a web service. Sample Example is given below:
<definitionsname="Welcome to E-Service"targetNamespace=http://example.org/math/xmlns=http://schemas.xmlsoap.org/wsdl/><!-- abstract definitions --><types> ...//element names<message> ..// message and part names<portType> ...//operations,I/O. <!-- concrete definitions --><binding> ...//binding name<service> ...//name and documentation</definition>
The Worldwide web has many information flows and has interactions and interchanging of data, therefore for retrieval of data from the current web the document should be well structured like XML. These XML technologies give the basic foundations. Therefore, this article gains some minimal knowledge about the various x-types and basics of links, stylesheets, and pointing the links on the XML document. As a result, you should examine different aspects of web applications.
This is a guide to XML Technologies. Here we also discuss the definition and various xml technologies along with examples and its code implementation. You may also have a look at the following articles to learn more –