org.apache.xerces.parsers
public class DOMParser extends AbstractDOMParser
Version: $Id: DOMParser.java,v 1.77 2005/06/24 02:33:43 mrglavas Exp $
Field Summary | |
---|---|
protected boolean | fUseEntityResolver2 Use EntityResolver2. |
protected static String | SYMBOL_TABLE Property identifier: symbol table. |
protected static String | USE_ENTITY_RESOLVER2 Feature identifier: EntityResolver2. |
protected static String | XMLGRAMMAR_POOL Property identifier: XML grammar pool. |
Constructor Summary | |
---|---|
DOMParser(XMLParserConfiguration config)
Constructs a DOM parser using the specified parser configuration. | |
DOMParser()
Constructs a DOM parser using the dtd/xml schema parser configuration. | |
DOMParser(SymbolTable symbolTable)
Constructs a DOM parser using the specified symbol table. | |
DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool)
Constructs a DOM parser using the specified symbol table and
grammar pool. |
Method Summary | |
---|---|
EntityResolver | getEntityResolver()
Return the current entity resolver.
|
ErrorHandler | getErrorHandler()
Return the current error handler.
|
boolean | getFeature(String featureId)
Query the state of a feature.
|
Object | getProperty(String propertyId)
Query the value of a property.
|
XMLParserConfiguration | getXMLParserConfiguration()
Returns this parser's XMLParserConfiguration. |
void | parse(String systemId)
Parses the input source specified by the given system identifier.
|
void | parse(InputSource inputSource)
parse
|
void | setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities. |
void | setErrorHandler(ErrorHandler errorHandler)
Allow an application to register an error event handler.
|
void | setFeature(String featureId, boolean state)
Set the state of any feature in a SAX2 parser. |
void | setProperty(String propertyId, Object value)
Set the value of any property in a SAX2 parser. |
Returns: The current entity resolver, or null if none has been registered.
See Also: DOMParser
Returns: The current error handler, or null if none has been registered.
See Also: DOMParser
Parameters: featureId The unique identifier (URI) of the feature being set.
Returns: The current state of the feature.
Throws: org.xml.sax.SAXNotRecognizedException If the requested feature is not known. SAXNotSupportedException If the requested feature is known but not supported.
Parameters: propertyId The unique identifier (URI) of the property being set.
Returns: The current value of the property.
Throws: org.xml.sax.SAXNotRecognizedException If the requested property is not known. SAXNotSupportedException If the requested property is known but not supported.
This method is equivalent to the following:
parse(new InputSource(systemId));
Parameters: systemId The system identifier (URI).
Throws: org.xml.sax.SAXException Throws exception on SAX error. java.io.IOException Throws exception on i/o error.
Parameters: inputSource
Throws: org.xml.sax.SAXException java.io.IOException
Parameters: resolver The new entity resolver. Passing a null value will uninstall the currently installed resolver.
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
Parameters: errorHandler The error handler.
Throws: java.lang.NullPointerException If the handler argument is null.
See Also: DOMParser
Parameters: featureId The unique identifier (URI) of the feature. state The requested state of the feature (true or false).
Throws: SAXNotRecognizedException If the requested feature is not known. SAXNotSupportedException If the requested feature is known, but the requested state is not supported.
Parameters: propertyId The unique identifier (URI) of the property being set. value The value to which the property is being set.
Throws: SAXNotRecognizedException If the requested property is not known. SAXNotSupportedException If the requested property is known, but the requested value is not supported.