Ticker

6/recent/ticker-posts

XML Basics - XML Elements, XML tags

 

XML Basics

1) All XML Elements Must Have a Closing Tag: It is illegal to omit the closing tag when anyone is creating XVII, syntax. XML elements must have a closing tag.

2) XML tags are Case sensitive: When one creates XML documents, the tag <Body> is different fro the tag <body>. 

3) All XML Elements must be Properly Nested: Improper nesting of tags makes no sense to XML. 

4) All XML Documents must have a Root Element: All )(NIL documents must contain a single tag pair to define a root element. All other elements must be within this root element. All elements can have sub elements (child elements). Sub elements must be correctly nested within their parent element. 

For example, 

<root> 

                <child> 

                                <subchild> </subchild> 

                </child> 

</root>

5) Attribute Values must always be Quoted: It is illegal to omit quotation marks around attribute values. XML elements can have attributes in name/value pairs; however, the attribute value must always be quoted. 

For example, 

<?xml version= "1.0" encoding="ISO-8859-1"?> 

<note date= "05/05/05"> 

<to>Dick</to> 

<from>Jane</from></note>