XML FAQ's
What is the single most important thing XML enables you to do now, that you were unable to do before?
XML has given me a truly universal data exchange format, as well a nice storage format for simple applications. As an exchange format, for the first time ever I can exchange data with people in a format that is typically human readable and easily processed by a computer using free/cheap software (check out www.xmlsoftware.com for example). Further more I can add new elements or attributes to an XML document that were not previously there, without the software that processes the file format breaking (providing the original content model was open).
What do you think the most important development in XML will be over the next 12 months?
For people to use XML as the basis for e-business exchange formats, open file formats etc, we need a decent schema specification. The schema format must allow us to unambiguously describe an expected/allowed format for a given class of XML document. This schema can then be used for validation, or as basic programming spec for conversion programs etc. The W3C are getting close with their schema spec, but no doubt this will need a lot of revision and work over the next 12 months. Once a good schema spec is in place, we need a good XML repository with 'decent' schemas. A lot of the existing repositories contain junk. For a good example of how to do things the right way, any EDI readers our there should check out the Basda (https://www.basda.org/) specifications on BizTalk. That's how EDI and XML should work together! Even if you are not in EDI, check out the basic approach to document structuring taken by Basda, it's good.
What do you consider to be the biggest misconception surrounding XML?
As XML was created by the W3C, it is often discussed in a context with HTML, and is often seen as being a web-only technology. Worse still, people often see it as a presentation language, something that is the replacement for HTML. Both of these are serious misconceptions. Whilst the W3C do focus on web technologies, people should understand that XML is nothing to do with presentation of data in a browser. XML is just a very good way of structuring data for exchange or processing. The fact that data can be processed using XSL, converted to HTML and then viewed in a browser, is just one of the many advantages of keeping data in an XML format (or exporting data into an XML format before processing). The same data could be imported into a database, converted into a different XML format etc etc.
XML FAQ's from dev-xml
What is SAX ?
SAX is an API for event-based XML parsing, as opposed to DOM-based XML parsing.
The home of SAX is here : https://www.megginson.com/SAX
That is, for DOM-based parsing, the parser reads in the entire XML document, builds a tree-based object model around the document, and then gives you access to the entire document through that object model. On the other hand, in event-based parsing you are given access to "events" that are raised to your application while the document is being read in by the parser. For example, there might be an event raised to tell your application "this is the start of an element", and another which says "this is the end of an element".
This is too small a nutshell to properly explain SAX. For a better resource, see https://www.megginson.com/SAX/
The advantages of SAX over DOM can be a smaller memory footprint, since the whole document doesn't have to be in memory at once, as well as speed. However, for applications where you need to access an entire document as an entity, DOM is the better way to go.
David Hunter
[email protected]
Other XML FAQ's and resources
Check your XML!
Microsoft XML Developer's Guide
Extreme XML Microsoft magazine - ASP Technology and the XML DOM, Sept 99 issue
SOAP spec
OReilly's DocBook , the long-awaited O'Reilly DocBook, and the entire book is online now
Oracle's XML pages , including free Developer's Kit, a live XML demo and technical articles.
Resources available for validating and checking XML
Richard Tobin's well-formedness and validator using the RXP parser.
Frontier 5's XML syntax checker
XML.com's RUWF - based on the Lark parser.