Computer Applications

Thursday, December 24, 2009

XML Language

 XML is a text-based markup language that is fast becoming the standard for data interchange on the web. As with HTML, you identify data using tags enclosed in angle brackets Collectively, the tags are known as markup.

  But unlike HTML, XML tags identify the data rather than specify how to display it. Whereas an HTML tag says something like, "Display this data in bold font, an XML tag acts like a field name in your program.

  The tags in this example identify the message as a whole, the destination and sender addresses, the subject, and the text of the message. As in HTML, the tag has a matching end tag. The data between the tag and its matching end tag defines an element of the XML data. Note, too, that the content of the tag is contained entirely within the scope of the tag. It is this ability for one tag to contain others that lets XML represent hierarchical data structures. 

  Again, as with HTML, whitespace is essentially irrelevant, so you can format the data for readability and yet still process it easily with a program. Unlike HTML, however, in XML you can easily search a data set for messages containing,  in the subject, because the XML tags identify the content of the data rather than specify its representation.

No comments:

Post a Comment