Custom-built XML processing
XML-oriented, but sometimes complex
-
SAX Filters
Originally demonstrated by David Megginson in XAF, an XML architectural forms processor, formalized by John Cowan, and then integrated with SAX 2.0, SAX filters provide a convenient and easily layered Java API for listening to event streams and modifying their contents as they fly past. If you don't need to look ahead in a document, some form of SAX processing may be ideal. They are extremely efficient, provided lookahead capability isn't needed.
-
DOM Processors
The Document Object Model lets you work on XML at your leisure. You have access to the entire document at once, and can manipulate nodes or process their content as you find appropriate. Because the entire document is represented in memory, you can change the beginning of a document based on its end. It's also easy to re-serialize DOMs as XML documents, though standardization of that process is still ongoing.
-
Using SAX and DOM to represent non-XML content
You can parse non-XML formats (EDI, delimited text, etc.) and report SAX events or build DOM trees. These are APIs, not necessarily direct conversions from XML, so there's a lot of freedom to bring in different data formats and treat them as XML.
Previous Page <
TOC
> Next Page