Software Sue

Link to Simply Sue
Link to Sustainability Sue
location: software/xml/introduction Skip navigation : Home  

Introduction to XML


Under construction

XML stands for EXtensible Markup Language. It is a subset of SGML. The purpose of XML is to describe data, just as the purpose of HTML is to display data. It is, therefore, a meta-language. Unlike HTML, in XML you define your own tags (e.g. <memo>) in XML. In XML, the data is described using a Document Type Definition (DTD) or an XML Schema. Once XML has been used to describe the data, another language is used to display it. XML is intended to be independent of platform, hardware and software. Whereas in HTML you have fixed mark-up such as <h1>, <head>, <b>, in XML you can create your own mark-up tags.

HTML has data and formatting all jumbled up. XML stores data outside HTML in separate files, so that the data can be changed without changing the HTML. It is also possible to store XML data in HTML pages as "Data Islands", however. XML data in separate (text) files can be exchanged between differing systems. This can be useful for B2B. XML data can also be stored in databases.

XML can be read in a variety of browsers and other reading programs, such as ones designed for the blind.

XML applications often support CSS (Cascading Style Sheets), but XSL (Extensible Style Sheet) is more extensible.

WML (Wireless Markup Language) and WAP were written using XML.

XML is a subset of SGML. It is NOT an extension of HTML.

Come up with a better example and check that code works

XMLXSL (sample.xsl)DDT (sample.ddt)
<?xml version="1.0" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <!ELEMENT RootElement (Container+)>
<?xml-stylesheet type="text/xsl" href="Sample.xsl"?> <xsl:template match="/"> <!ELEMENT Container(Child1,Child2)>
<!DOCTYPE Rootelement SYSTEM "Sample.dtd"> <html> <!ELEMENT Child1 (#PCDATA)>
<RootElement > <xsl:apply-templates/> <!ELEMENT Child2 (#PCDATA)>
   <Container> </html>  
     <Child1>first child's data</Child1> </xsl:template>  
     <Child2>second child's data</Child2> <xsl:template match="RootElement">  
   </Container> <title>A brief sample</title>  
</RootElement> <head>  
  </head>  
  <body bgcolor="#FFFFFF">  
  <xsl:apply-templates/>  
  </body>  
  </xsl:template>  
  <xsl:template match="Container">  
  <font face="Arial" size="4"><b>  
  Child1:  
  <xsl:value-of select="Child1"/></b></font>  
  </xsl:template>  
  </xsl:stylesheet>  
     

More XML

DTD

XSL