XML Document Structure
by Dinesh[ Edit ] 2012-07-22 22:36:15
XML Document Structure:
Although elements, attributes, and text are very important for XML documents,these design objects alone do not make up a well-formed XML document without being arranged under certain structural and syntax rules. The Following program shows the XML Document Structure.
This is level 1 of the nested
elements
This is level 2 of the nested
elements
Most XML documents start with an element at the top of the page. This is called an XML document declaration. An XML document declaration is an optional element that is useful to determine the version of XML and the encoding type of the source data. It is not a required element for an XML document to be well formed in the W3C XML 1.0 specification. This is the most common XML document declaration:
There are two attributes contained in this XML declaration that are commonly seen but not often explained. The XML version is used to determine what version of the W3C XML recommendation that the document adheres to. XML parsers use this information to apply version-specific syntax rules to the XML document.