Extensible Markup Language (XML)

What is XML?

Extensible Markup Language (XML) is used to describe information in a tree-like structure via embedded markup of elements, attributes and others. The best way to know XML is to read XML 1.0 Specification. To help read it, please visit the annotated site.

The most benefit of using XML is semantic, i.e. users can take control of the information representation by creating and using a vocabulary that makes sense for themself. In addition, XML allows tools to constrain the creation of an instance of the information, and allows users to validate a properly created instance of information against set of constraints.

XML consists of three main parts: Document Type Definition:DTD, Extensible Style Language:XSL, and Extensible Link Language:XLL.

DTD defines the elements, the attributes, and the relationship between them. It is not a must have file. Lots of available DTDs can be used directly, e.g. HL7 SGML/XML for medical use.

XSL is much like CSS but more powerful.

XLL is a flexible link description.

An Example of a XML File

DTD

<!ELEMENT list (resume,author,address*,
                telephone,skills)+>
 <!ELEMENT resume (#PCDATA)>
 <!ELEMENT author (#PCDATA)>
 <!ELEMENT address (street, city)*>
  <!ELEMENT street (#PCDATA)>
  <!ELEMENT city (#PCDATA)>
 <!ELEMENT telephone (#PCDATA)>
 <!ELEMENT skills (#PCDATA)>


XML

<?xml version="1.0" standalone="no"?>  <!--always begin like this-->
<!DOCTYPE list SYSTEM "a.dtd" >
 <list>    <!--root element-->
  <resume>
   <author>Wesley</author>
   <address>
    <street>18 Wildhorse Street</street> 
    <city>Atlanta</city>
</address> <telephone>770 9783698</telephone> <skills>Java, C++, Linux, PostgreSQL</skills>
2-year programming experience... </resume> </list>

What is the difference between HTML and XML?

XML is not used to replace HTML. XML, which is a subset of SGML, has been designed for ease of implementation and for interoperability with both SGML and HTML.

a. XML is more flexible than HTML. Users can define their own id and attributes to describle the data more meaningful.
b. XML supports complex embedded structure.
c. There is no software to be able to check the structure of HTML files. A XML file can include a structure description file to let other software to check it.

XML and DOM, SAX, DTD

When programming in XML, DOM, SAX, and DTD are must ... Document Object Model

XML Web Sites

XML: http://www.w3.org/XML, http://www.xml.com
XSL/XSLT: http://www.w3.org/Style/XSL, http://www.xslt.com

Specification: http://www.xml.com/axml/testaxml.htm
XML FAQ: http://www.ucc.ie/xml/ , http://www.finetuning.com/faq.html
XSL FAQ: http://www.dpawson.co.uk/xsl/idx.html , http://www.jguru.com/jguru/faq/faqpage.jsp?name=XML
XML Web Sites: http://www.xml-zone.com/ , http://www.xmlinfo.com/ , http://www.simonstl.com/ , http://www.xmlsoftware.com/
Microsoft: http://msdn.microsoft.com/xml/c-frame.htm#/xml/default.asp
XML news: http://xmlhack.com/
Apache open source: http://xml.apache.org/

XML Tools

Dreamweaver: http://www.macromedia.com/software/dreamweaver/
Microsoft Notepad: http://www.microsoft.com/xml/notepad/intro.asp
Adobe: http://www.adobe.com/prodindex/framemaker/prodinfosgml.html

Parser:

James Clark: http://www.jclark.com/xml/expat.html
IBM: http://www.alphaworks.ibm.com/tech/xml
Microsoft: http://www.microsoft.com/xml/parser/cparser.asp

XML Application

XML, Java and the Future of the Web
http://metalab.unc.edu/pub/sun-info/standards/xml/why/xmlapps.html

XML and Servlet http://www.chinabyte.com/builder/builder_course1.shtm?parid=1&buiid=372

XML and Servlet FAQ
http://www.chinabyte.com/staticpages/builder/builder_course/ GJBC/builder_course_372_1_GJBC.html

http://www.xml.net.cn/
http://www.xml.org.cn:8188
http://www.xml.com.cn/
http://www.egroups.com/group/china_xml_list/info.html