public class DOMParser extends Object
| Modifier and Type | Method and Description | 
|---|---|
| Document | getDocument()Get the document. | 
| EntityResolver | getEntityResolver()Return the current entity resolver. | 
| ErrorHandler | getErrorHandler()Return the current error handler. | 
| boolean | getFeature(String featureId)Query the current state of any feature in a SAX2 parser. | 
| String[] | getFeaturesRecognized()Returns a list of features that this parser recognizes. | 
| Locator | getLocator()return the locator being used by the parser | 
| String[] | getPropertiesRecognized()Returns a list of properties that this parser recognizes. | 
| Object | getProperty(String propertyId)Return the current value of a property in a SAX2 parser. | 
| boolean | isFeatureRecognized(String featureId)Returns true if the specified feature is recognized. | 
| boolean | isPropertyRecognized(String propertyId)Returns true if the specified property is recognized. | 
| void | parse(InputSource source)Parses the specified input source. | 
| void | parse(String systemID)Parses the input source specified by the given system identifier. | 
| void | reset()Resets the parser. | 
| void | resetOrCopy()Resets or copies the parser. | 
| void | setEntityResolver(EntityResolver resolver)Sets the resolver used to resolve external entities. | 
| void | setErrorHandler(ErrorHandler handler)Sets the error handler. | 
| void | setFeature(String featureId,
          boolean state)Set the state of any feature in a SAX2 parser. | 
| void | setLocale(Locale locale)Set the locale to use for messages. | 
| void | setProperty(String propertyId,
           Object value)Set the value of any property in a SAX2 parser. | 
public Document getDocument()
public String[] getFeaturesRecognized()
public String[] getPropertiesRecognized()
public void reset()
public void resetOrCopy()
public void setFeature(String featureId, boolean state) throws SAXNotSupportedException
featureId - The unique identifier (URI) of the feature.state - The requested state of the feature (true or false).SAXNotRecognizedException - If the requested feature is
                                      not known.SAXNotSupportedException - If the requested feature is
                                     known, but the requested state
                                     is not supported.public boolean getFeature(String featureId) throws SAXNotSupportedException
featureId - The unique identifier (URI) of the feature
                  being set.SAXNotRecognizedException - If the requested feature is
                                      not known.SAXNotSupportedExceptionpublic void setProperty(String propertyId, Object value) throws SAXNotSupportedException
propertyId - The unique identifier (URI) of the property
                   being set.value - The value to which the property is being set.SAXNotRecognizedException - If the requested property is
                                      not known.SAXNotSupportedException - If the requested property is
                                     known, but the requested
                                     value is not supported.public Object getProperty(String propertyId) throws SAXNotSupportedException
propertyId - The unique identifier (URI) of the property
                   being set.SAXNotRecognizedException - If the requested property is
                                      not known.SAXNotSupportedExceptionpublic boolean isFeatureRecognized(String featureId)
public boolean isPropertyRecognized(String propertyId)
public final Locator getLocator()
public void setEntityResolver(EntityResolver resolver)
resolver - The new entity resolver. Passing a null value will
                 uninstall the currently installed resolver.public EntityResolver getEntityResolver()
setEntityResolver(org.xml.sax.EntityResolver)public void setErrorHandler(ErrorHandler handler)
handler - The new error handler.public ErrorHandler getErrorHandler()
setErrorHandler(org.xml.sax.ErrorHandler)public void parse(InputSource source) throws SAXException, IOException
source - The input source.SAXException - Throws exception on SAX error.IOException - Throws exception on i/o error.public void parse(String systemID) throws SAXException, IOException
This method is equivalent to the following:
     parse(new InputSource(systemId));
 systemID - The input source.SAXException - Throws exception on SAX error.IOException - Throws exception on i/o error.public void setLocale(Locale locale)
locale - The locale object to use for localization of messages.SAXException - An exception thrown if the parser does not
                         support the specified locale.Copyright © 1999–2017 Apache OODT. All rights reserved.