gnu.xml.util
public final class DomParser extends Object implements XMLReader
Name | Notes |
---|---|
(URL)/external-general-entities | false (does no parsing) |
(URL)/external-parameter-entities | false (does no parsing) |
(URL)/namespaces | Value is fixed at true |
(URL)/namespace-prefixes | Value is settable, defaulting to false
(xmlns attributes hidden, and names aren't prefixed)
|
(URL)/string-interning | Value is fixed at false (DOM provides no guarantees as to interning) |
(URL)/validation | false (does no parsing) |
(URL)/lexical-handler/parameter-entities | false (DOM doesn't do parameter entities) |
(URL)/dom-node | This property may be set before parsing to hold a DOM Document node; any arguments given to parse methods are ignored. When retrieved during a parse, this value contains the "current" DOM node. |
(URL)/declaration-handler | A declaration handler may be provided. Declaration of external general entities is exposed, but not parameter entities; none of the entity names reported here will begin with "%". |
(URL)/lexical-handler | A lexical handler may be provided. While the start and end of any external subset are reported, expansion of other parameter entities (e.g. inside attribute list declarations) is not exposed. Expansion of general entities within attributes is also not exposed (see below). |
The consequences of modifying a DOM document tree as it is being walked by this "parser" are unspecified; don't do it!
Version: $Date: 2001/11/09 22:58:17 $
Constructor Summary | |
---|---|
DomParser()
Constructs an unitialized SAX2 parser. | |
DomParser(Node node)
Constructs an SAX2 parser initialized to traverse the specified
DOM tree. |
Method Summary | |
---|---|
ContentHandler | getContentHandler()
SAX2: Returns the object used to report the logical
content of an XML document. |
DTDHandler | getDTDHandler()
SAX2: Returns the object used to process declarations related
to notations and unparsed entities. |
EntityResolver | getEntityResolver()
SAX2: Returns the object used when resolving external
entities during parsing (both general and parameter entities). |
ErrorHandler | getErrorHandler()
SAX2: Returns the object used to receive callbacks for XML
errors of all levels (fatal, nonfatal, warning). |
boolean | getFeature(String name)
SAX2: Tells whether this parser supports the specified feature. |
Object | getProperty(String name)
SAX2: Returns the specified property. |
void | parse(String uri)
SAX1: Parses the previously provided DOM document (the
input parameter is ignored). |
void | parse(InputSource input)
SAX1: Parses the previously provided DOM document (the
input parameter is ignored). |
void | setContentHandler(ContentHandler handler)
SAX2: Assigns the object used to report the logical
content of an XML document. |
void | setDTDHandler(DTDHandler handler)
SAX1: Provides an object which may be used to intercept
declarations related to notations and unparsed entities. |
void | setEntityResolver(EntityResolver resolver)
SAX1: Provides an object which may be used when resolving external
entities during parsing (both general and parameter entities). |
void | setErrorHandler(ErrorHandler handler)
SAX1: Provides an object which receives callbacks for XML errors
of all levels (fatal, nonfatal, warning). |
void | setFeature(String name, boolean state)
SAX2: Sets the state of features supported in this parser.
|
void | setLocale(Locale locale)
SAX1: Identifies the locale which the parser should use for the
diagnostics it provides.
|
void | setProperty(String name, Object state)
SAX2: Assigns the specified property. |
Parameters: uri ignored (pass an empty string)
Throws: SAXException as defined in the specification for org.xml.sax.Parser.parse()
Parameters: input ignored
Throws: SAXException as defined in the specification for org.xml.sax.Parser.parse()
Throws: SAXException as defined in the specification for org.xml.sax.Parser.setLocale()
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2011-08-26.