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 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> 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. XML and DOM, SAX, DTD When programming in XML, DOM, SAX, and DTD are must ... Document Object ModelXML Web Sites
XML Tools
Parser:
XML Application
|