Top Description Methods
com.sun.xml.xsom.parser

public Interface XMLParser

Known Direct Implementers
com.sun.tools.xjc.ModelLoader.XMLSchemaParser, com.sun.tools.xjc.reader.internalizer.DOMForestParser, com.sun.xml.xsom.parser.JAXPParser
Imports
java.io.IOException, org.xml.sax.ContentHandler, .EntityResolver, .ErrorHandler, .InputSource, .SAXException

Interface that hides the detail of parsing mechanism.
Author
Kohsuke Kawaguchi ([email protected])

Method Summary

Modifier and TypeMethod and Description
public void
parse(InputSource source, ContentHandler handler, ErrorHandler
Errors found during the parsing must be reported to this handler so that XSOM can recognize that something went wrong. Always a non-null valid object
errorHandler
,
EntityResolver
Entity resolution should be done through this interface. Can be null.
entityResolver
)

Parses the document identified by the given input source and sends SAX events to the given content handler.

Method Detail

parseback to summary
public void parse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver) throws SAXException, IOException

Parses the document identified by the given input source and sends SAX events to the given content handler.

This method must be re-entrant.

Parameters
errorHandler:ErrorHandler

Errors found during the parsing must be reported to this handler so that XSOM can recognize that something went wrong. Always a non-null valid object

entityResolver:EntityResolver

Entity resolution should be done through this interface. Can be null.

Exceptions
SAXException:
If ErrorHandler throws a SAXException, this method will tunnel it to the caller. All the other errors must be reported to the error handler.