Home arrow XML arrow Page 5 - Introduction To XML

Starting From The Roots of XML - XML

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.

TABLE OF CONTENTS:
  1. Introduction To XML
  2. Preparing Yourself For The Future!
  3. The Name Says It All..EXtensible:
  4. Proof Is In The Output
  5. Starting From The Roots of XML
  6. The Best Of Both The Worlds
  7. The Potential Of XML
  8. XML Parser
By: Gayathri Gokul
Rating: starstarstarstarstar / 44
August 28, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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 isnt 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 arent 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 DTDs:
As stated earlier XML tags dont 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.

 
 
>>> More XML Articles          >>> More By Gayathri Gokul
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

XML ARTICLES

- Google Docs and Xpath Data Functions
- Flex Array Collection Sort and Filtering
- The Flex Tree Control
- Flex List Controls
- Working with Flex and Datagrids
- How to Set Up Podcasting and Vodcasting
- Creating an RSS Reader Application
- Building an RSS File
- An Introduction to XUL Part 6
- An Introduction to XUL Part 5
- An Introduction to XUL Part 4
- An Introduction to XUL Part 3
- An Introduction to XUL Part 2
- An Introduction to XUL Part 1
- XML Matters: Practical XML Data Design and M...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: