Partial DocumentParser implementation, leaving only one of the parse methods abstract.
Default eu.cdevreeze.yaidom.parse.ElemProducingSaxHandler implementation.
eu.cdevreeze.yaidom.Document parser.
DOM-based Document parser.
DOM-LS-based Document parser.
SAX-based Document parser.
StAX-based Document parser.
Contract of a SAX ContentHandler that, once ready, can be asked for the resulting eu.cdevreeze.yaidom.Elem using
method resultingElem, or the resulting eu.cdevreeze.yaidom.Document using method
resultingDocument.
Mixin extending DefaultHandler that contains a Locator.
Thread-local DocumentParser.
Support for parsing XML into yaidom
Documents andElems. This package offers the eu.cdevreeze.yaidom.parse.DocumentParser trait, as well as several implementations. Those implementations use JAXP (SAX, DOM or StAX), and most of them use theconvertpackage to convert JAXP artifacts to yaidomDocuments.For example:
This example chose a SAX-based implementation, and used the default configuration of that document parser.
Having several different fully configurable JAXP-based implementations shows that yaidom is pessimistic about the transparency of parsing and printing XML. It also shows that yaidom is optimistic about the available (heap) memory and processing power, because of the 2 separated steps of JAXP parsing/printing and (in-memory)
convertconversions. Using JAXP means that escaping of characters is something that JAXP deals with, and that's definitely better than trying to do it yourself.One
DocumentParserimplementation does not use anyconvertconversion. That isDocumentParserUsingSax. It is likely the fastest of theDocumentParserimplementations.The preferred
DocumentParserfor XML (not HTML) parsing isDocumentParserUsingDomLS, if memory usage is not an issue. ThisDocumentParserimplementation is best integrated with DOM, and is highly configurable, although DOM LS configuration is somewhat involved.This package depends on the eu.cdevreeze.yaidom and eu.cdevreeze.yaidom.convert packages, and not the other way around.