It's a fact of life that XML, which stands for eXtensible Markup Language, is invading our lives more and more as programmers, and I feel this is a good thing. The reason being XML has the ability to cross all sorts of boundaries, and probably the only chance we have to obtain a truly independent, cross-platform data transfer format.
Root Tags: Another term to be aware of is the Root Tag. This is defined as the outer tag, and an XMl document can have only one root. For example:
<BookAuthors>
<Author>
<au_id>1001</au_id>
<au_name> Bill Gates </au_name>
</Author>
<Author>
<au_id>1002</au_id>
<au_name> Harry Potter</au_name>
</Author>
</BookAuthors>
There can be only one top-level tag in the above code <BookAuthors>. Say you add <BookAuthors> some <author>tags and another <Bookauthors> within the above tag, then it will become invalid.
The <?XML Tag>: This isn’t a true XML tag but special tag indicating special processing instructions. The <?xml tag> should be the first line of each XML document. And can be used to identify the version and language information. It is also a place where you define the language used in your XML data. It is trivial that if your data contains characters that aren’t a part of ASCII (standard english character set) you can specify the encoding used in your document by adding encoding attribute to the ?xml processing instruction as follows:
<?xml version=”1.0” encoding=”iso-8859-1” ?>
Attributes:
Like HTML, XML has Attributes to define the properties of elements, and they mus also be well-formed.
Special Characters: XML has special set of characters, which cannot be used as normal string. They are &, <, >, “ and,. For example the following is invalid <book> Advanced ASP & ADO Concepts </book>
Schemas and DTD’s: As stated earlier XML tags don’t actual mean anything and you can give any name, but how do you know what name to give and what sort of tags are allowed in a document. For this purpose you have to use either a Document Type Definition (DTD) or Schema. Schema and DTDs are like flip side of the same coin. They both specify which element are allowed in a document, and can run well-formed XML document into Valid XML document. All this means is that XML as well as being correctly marked up (well-formed) it contains only allowed elements and attributes.