[icoSystem.png]Sitemap
[icoDocs.png]Documents
[icoFolderApps.png]Program files
[icoFolderWin.png]Windows
[icoHelp.png] Help[icoXml.png] XML
[icoXml.png]
 XML (22jul2009)
XML is a standard for organizing a generic data tree in one or more text files. The advantage of text files is that they can be easily handled by anything. As I said, data are organized in a tree, a structure consisting of nodes linked together by a parent-child relationship. Most of the nodes have one parent and some child nodes, except one called root that has no parent and the leaves (nodes with no childrens). Each node has a name (tag), and can have some attributes and a content.
 example.xml
<?xml version="1.0" encoding="utf-8"?> <!-- This is just an example of a DTD declaration --> <!DOCTYPE root [ <!ENTITY ver '0.1'> <!ELEMENT root (parent+)> <!ATTLIST faq id CDATA #IMPLIED > <!ELEMENT parent (#PCDATA|child)*> <!ATTLIST parent index CDATA #REQUIRED > <!ELEMENT child (#PCDATA|child)*> ] > <!-- A transformation --> <?xml-stylesheet type="text/xml" media="screen" href="tohtml.xsl"?> <root xmlns=""> <parent index="1"> <child>child 1</child> <child>child 2</child> <child>child 3 <![CDATA[<<<unparsed>>>text<<<]]></child> </parent> <parent index="2"> <child>child 1</child> <child> <child>grandchild 1</child> </child> </parent> </root>