[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
How_To_XML_Create_Nested_XML_Document
Nested elements mean that child elements can contain further child elements themselves such as the <location> element has the <department> and <room> child elements in the example.
XML FAQ
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
How_To_XML_Create_Nested_XML_Document
How to create nested elements in an XML document?
An XML document can be thought of as a database containing records. In the example, the <book> element is the table that holds the child elements that have fields such as <title> or <location>.Nested elements mean that child elements can contain further child elements themselves such as the <location> element has the <department> and <room> child elements in the example.
<?xml version="1.0"?> <books> <book> <title>OpenGL Programming Guide Fourth Edition</title> <ISBN>0321173481</ISBN> <author>Michael R. Sweet</author> <location> <department>Development</department> <room>107</room> </location> <publisher>Addison-Wesley</publisher> <year>2004</year> </book> <book> <title>Curves and Surfaces for CAGD: A Practical Guide</title> <ISBN>0849371643</ISBN> <author>Gerald Farin </author> <location> <department>Development</department> <room>116</room> </location> <publisher>Academic Press</publisher> <year>2002</year> </book> <book> <title>An Introduction to NURBS: With Historical Perspective</title> <ISBN>1558606696</ISBN> <author>David Rogers</author> <location> <department>Development</department> <room>120</room> </location> <publisher>Academic Press</publisher> <year>2001</year> </book> <book> <title>NURBS: From Projective Geometry to Practical Use</title> <ISBN>1568810849</ISBN> <author>Gerald Farin</author> <location> <department>Development</department> <room>126</room> </location> <publisher>A K Peters</publisher> <year>1999</year> </book> </books>
XML FAQ
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
