XML
allows you to tag data in a way that is similar to how you tag data
when creating an HTML file. XML incorporates many of the successful
features of HTML, but was also developed to address some of the limitations
of HTML. XML tags may be user-defined, by either a DTD or a document
written in the XML Schema language, that can be used for validation.
In addition, namespaces can help ensure you have unique tags for your
XML document. The syntax of XML has more restrictions than HTML, but
this results in faster and cheaper browsing. The ability to create
your own tagging structure gives you the power to categorize and structure
data for both ease of retrieval and ease of display. XML is already
being used for publishing, as well as for data storage and retrieval,
data interchange between heterogeneous platforms, data transformations,
and data displays. As these XML applications evolve and become more
powerful, they may allow for single-source data retrieval and data
display.
The
benefits of using XML vary but, overall, marked-up data and the ability
to read and interpret that data provide the following benefits:
- With XML, applications can more easily read information from a
variety of platforms. The data is platform-independent, so
now the sharing of data between you and your customers can be
simplified.
- Companies that work in the business-to-business (B2B) environment
are developing DTDs and schemas for their industry. The ability
to parse standardized XML documents gives business products an opportunity
to be exploited in the B2B environment.
- XML data can be read even if you do not have a detailed picture
of how that data is structured. Your clients will no longer need to
go through complex processes to update how to interpret data that
you send to them because the DTD or schema gives the ability to understand
the information.
- Changing the content and structure of data is easier with XML.
The data is tagged so you can add and remove elements without impacting
existing elements. You will be able to change the data without having
to change the application.
However, despite all the benefits of using XML, there are
some things to be aware of. First of all, working with marked up data
can be additional work when writing applications because it physically
requires more pieces to work together. Given
the benefits of using XML, this additional work up front can reduce
the amount of work needed to make a change in the future. Second,
although it is a recommendation developed by the World Wide Web Consortium
(W3C®), XML, along with its related technologies and standards including
Schema, XPath, and DOM/SAX APIs, is still a developing technology.
An XML parser is a processor that reads an XML document and determines
the structure and properties of the data. It breaks the data up into
discrete units and provides them to other components. There are two
basic types of XML parsers: non-validating and validating. A non-validating
parser checks if a document is well-formed, but does not check a document
against any DTDs or XML Schemas. A validating parser not only checks
if a document is well-formed, but also verifies that it conforms to
a specific DTD or XML Schema.