Package org.jdom.contrib.input.scanner

ElementScanner is a SAX filter that uses XPath-like expressions to select element nodes to build and notifies listeners when these elements becomes available during the SAX parse.

See:
          Description

Interface Summary
ElementListener The interface objects listening for element creation notification fired by ElementScanner shall implement.
 

Class Summary
ElementScanner An XML filter that uses XPath-like expressions to select the element nodes to build and notifies listeners when these elements becomes available during the parse.
XPathMatcher The base class for all XPath matchers used by ElementScanner.
 

Package org.jdom.contrib.input.scanner Description

ElementScanner is a SAX filter that uses XPath-like expressions to select element nodes to build and notifies listeners when these elements becomes available during the SAX parse.

ElementScanner does not aim at providing a faster parsing of XML documents. Its primary focus is to allow the application to control the parse and to consume the XML data while they are being parsed. ElementScanner can be viewed as a high-level SAX parser that fires events conveying JDOM elements rather that XML tags and character data.

ElementScanner only notifies of the parsing of element nodes and does not support reporting the parsing of DOCTYPE data, processing instructions or comments except for those present within the selected elements. Application needing such data shall register a specific ContentHandler of this filter to receive them in the form of raw SAX events.

Please refer to ElementScanner for details on how to use ElementScanner within an application.

A sample application is also provided here, with an example XML file.



Copyright © 2011 Jason Hunter, Brett McLaughlin. All Rights Reserved.