Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is XML good for?

XML 101

What is XML good for?

by  flumpy  Posted    (Edited  )
XML is a way of formalising data for either storage or transfer between many separate systems. It allows data to be stored in a human readable format, therefore clarifying for users as well as programs what the data is there for.

XML allows many disparate groups to define their own data formats easily - hence the eXtensible part. They can also (as mentioned above) define HOW that data is to be interpretted (meta-data).

XML also helps immensely in large organisations/global (internet) systems when there are many different systems communicating with each other. As long as a XML enabled utility specifies that the data in XML belongs to them in some way, the systems can read the data that belongs to them and only them if they wish. For example, if you had an accounts package that needed to produce a report on accounts, you could identify all your xml tags with an accounts prefix, or namespace as it is known eg. <myaccounts:balance> would identify "balance" globally within the namespace "myaccounts" (with a bit more work than that, but not much).

With XML therefore, I can generate a page of XML from one system (say the accounts package again) which contains accounts information. I can then pass it on to another system, say a management package which analyses the data and appends another set of elements to the document. I now have accounts AND management data within my document, but any system (or indeed person) that wants to read it can easily identify which data is which; immensely useful, and not something that could easily be done with any other data format such as binary.

As long as the system has a parser, it can read any XML document - as long as it is accessable of course.

XML's sibling utilities (XSLT, XPATH, FOP etc) provide an exceedingly powerful way of reading, interpretting, searching and transforming data from one form into another. For example, using XSLT, I can specify templates to transform vast XML documents of information to other document types (XML, text, HTML etc) specific to my operations. With XPATH I am provided with a large number of tools to search and manipulate elements in the XML archive. And with FOP, I can transform my data into Acrobat reader format. Fantastic :)

XML is not an answer to all problems with b2b (business to business) communications, but it does simplify the problem immensely.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top