What is XML?

AAEAAQAAAAAAAAIRAAAAJDczNTMzYzYxLWE0MWEtNGYwMS1iYWI2LWE2ZDNmZTBjMDg2NQ

Extensible Markup Language (XML) and its effect in altering the application development is the latest buzzword in the IT industry. XML is being considered as the most exciting new development in Web technology. Users of HTML will be amazed by the flexibility of XML. Complex web pages that integrate multiple sources of data or required dynamic behavior can be achieved easily by using XML.

It supports many special purpose applications for businessman, chemists, document author, scientists, and mathematicians and so on.

Schema

A Schema is a set of rules to constrain the structure and expressive the information set of XML documents. A Schema describes a model for a whole class of documents. The model describes the way in which the data is marked up, and also specifies the possible arrangement of tags and text in a valid document. A schema might be considered a common vocabulary that is needed to exchange documents between different organizations.

DOM

The Document Object Model (DOM) is a programming interface for XML documents. It defines how XML documents can be programmatically accessed and manipulated. The DOM provides access to the XML document structure through a set of Objects. It defines an Application Programming Interface (API) for accessing and manipulating XML documents. The DOM is used by high-level applications. An XML Parser and DOM implementation are required to write an application that can access the XML documents through DOM. The DOM does not directly deals with object. It defines an interface to which the objects must conform.

XSLT

Extensible Stylesheet Language Transformations (XSLT) is an XML application with the help of which one XML document can be transformed into another XML document or another format. Using XSLT, helps avoid creating multiple custom computer programs to transform data; instead one can create one or more XSLT sheets. To perform an XSLT transformation, an XML document, a XSL Stylesheet and an XSLT processor are required.

DSO

The XML Data Source Objects (DSOs) is a Microsoft ActiveX control, built into Microsoft Internet Explorer. DSO helps in formatting and displaying data on an HTML page. Using DSO, it is possible to extract data from an external XML document or from the XML data embedded in the HTML documents.

Sample1.xml file

<?xml version="1.0"?>

<book-store>

<book>

<book-id>B001</book-id>

<title> Digital Computer</title>

<author>Herbert Shield</author>

<category>Computer Organization</category>

</book>

<book>

<book-id>B002</book-id>

<title>Computer Architecture</title>

<author>Morris Mano</author>

<category>Computer Organization</category>

</book>

</book-store>

Sample2.xsl file

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/book-store">

<html>

<head>

<title>Switching Styles</title>

</head>

<body>

<table id="items" width="80%" align="center" cellpadding="0" cellspacing="0" border="1">

<thead>

<th>Book Id</th>

<th>Book Title</th>

<th>Author</th>

<th>Category</th>

</thead>

<br></br>

<xsl:for-each select="book">

<tr>

<td><xsl:value-of select="book-id"/></td>

<td><xsl:value-of select="title"/></td>

<td><xsl:value-of select="author"/></td>

<td><xsl:value-of select="category"/></td>

</tr>

</xsl:for-each>

</table>

</body>

</html>

</xsl:template>

</xsl:stylesheet>

Sample1.html file

<html>

<head>

<title>Accessing records of an XML Document using DSO</title>

<script language="JavaScript">

function viewrecords()

{

products.dataPageSize=items.value;

products.firstPage();

}

</script>

</head>

<body bgcolor="Pink">

<xml id="productdb" src="sample1.xml">

</xml>

<center>

Enter the number of records to view in one page:

<input type="text"maxlength="1" size="2" id="items">

<input type="button" value="view" onclick="viewrecords()">

<table id="products" datasrc="#productdb" width="80%" align="center" cellpadding="0" cellspacing="0" border="1">

</center>

<br></br>

<hr>

<thead>

<th>Book Id</th>

<th>Book Title</th>

<th>Author</th>

<th>Category</th>

</thead>

<br></br>

<tr>

<td><div datafld="book-id"/></td>

<td><div datafld="title"/></td>

<td><div datafld="author"/></td>

<td><div datafld="category"/></td>

</tr>

</body>

</html>

At CPD technologies, institute in Delhi You can learn web designing course under the supervision of web designers who train you for photoshop, layout designing, design aesthetic, functionality integration and develop more innovative and appealing website.

For more info : cpd-india

Batches: Regular & Weekends for Working Profession

For FREE DEMO CLASS CALL – 011-65164822 / 91- 8860352748

CPD Technologies Block C 9/8, Sector – 7, Rohini, Delhi – 110085, India Landmark: Near Rohini East Metro Station, Opposite Metro Pillar No-397

Website :- www.cpd-india.com

Email :- support@cpd-india.com

Your email address will not be published. Required fields are marked *

Contact CPD Technologies