Well Formed XML Documents
XML with
correct syntax is "Well Formed" XML. XML validated against a DTD is
"Valid" XML.
A
"Well Formed" XML document must have the following correct XML
syntax:
- XML
documents must have a root element
- XML
elements must have a closing tag
- XML tags
are case sensitive
- XML
elements must be properly nested
- XML
attribute values must be quoted
Example for XML Document
<?xml
version="1.0" encoding="ISO-8859-1"?> <note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me! </body> </note>
Xml
document begins with XML declaration statement: <? xml
version="1.0" encoding="ISO-8859-1"?> . The next line
describes the root element of the document: <note>. This element is
"the parent" of all other elements. The next 4 lines describe 4 child
elements of the root: to, from, heading, and body. And finally the last line
defines the end of the root element : < /note>
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.