Public Member Functions | |
SAXBuilder () | |
SAXBuilder (boolean validate) | |
SAXBuilder (String saxDriverClass) | |
SAXBuilder (String saxDriverClass, boolean validate) | |
String | getDriverClass () |
JDOMFactory | getFactory () |
void | setFactory (JDOMFactory factory) |
boolean | getValidation () |
void | setValidation (boolean validate) |
ErrorHandler | getErrorHandler () |
void | setErrorHandler (ErrorHandler errorHandler) |
EntityResolver | getEntityResolver () |
void | setEntityResolver (EntityResolver entityResolver) |
DTDHandler | getDTDHandler () |
void | setDTDHandler (DTDHandler dtdHandler) |
XMLFilter | getXMLFilter () |
void | setXMLFilter (XMLFilter xmlFilter) |
boolean | getIgnoringElementContentWhitespace () |
void | setIgnoringElementContentWhitespace (boolean ignoringWhite) |
boolean | getReuseParser () |
void | setReuseParser (boolean reuseParser) |
void | setFeature (String name, boolean value) |
void | setProperty (String name, Object value) |
Document | build (InputSource in) throws JDOMException, IOException |
Document | build (InputStream in) throws JDOMException, IOException |
Document | build (File file) throws JDOMException, IOException |
Document | build (URL url) throws JDOMException, IOException |
Document | build (InputStream in, String systemId) throws JDOMException, IOException |
Document | build (Reader characterStream) throws JDOMException, IOException |
Document | build (Reader characterStream, String systemId) throws JDOMException, IOException |
Document | build (String systemId) throws JDOMException, IOException |
boolean | getExpandEntities () |
void | setExpandEntities (boolean expand) |
Protected Member Functions | |
SAXHandler | createContentHandler () |
void | configureContentHandler (SAXHandler contentHandler) |
XMLReader | createParser () throws JDOMException |
void | configureParser (XMLReader parser, SAXHandler contentHandler) throws JDOMException |
Known issues: Relative paths for a DocType or EntityRef may be converted by the SAX parser into absolute paths.
Brett McLaughlin
Dan Schaffer
Philip Nelson
Alex Rosen
|
Creates a new SAXBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default SAX Drivers. The underlying parser will not validate. |
|
Creates a new SAXBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default SAX Drivers. The underlying parser will validate or not according to the given parameter.
|
|
Creates a new SAXBuilder using the specified SAX parser. The underlying parser will not validate.
|
|
Creates a new SAXBuilder using the specified SAX parser. The underlying parser will validate or not according to the given parameter.
|
|
This builds a document from the supplied URI.
|
|
This builds a document from the supplied Reader. It's the programmer's responsibility to make sure the reader matches the encoding of the file. It's often easier and safer to use an InputStream rather than a Reader, and to let the parser auto-detect the encoding from the XML declaration.
|
|
This builds a document from the supplied Reader. It's the programmer's responsibility to make sure the reader matches the encoding of the file. It's often easier and safer to use an InputStream rather than a Reader, and to let the parser auto-detect the encoding from the XML declaration.
|
|
This builds a document from the supplied input stream.
|
|
This builds a document from the supplied URL.
|
|
This builds a document from the supplied filename.
|
|
This builds a document from the supplied input stream.
|
|
This builds a document from the supplied input source.
|
|
This configures the SAXHandler that will be used to build the Document. The default implementation simply passes through some configuration settings that were set on the SAXBuilder: setExpandEntities() and setIgnoringElementContentWhitespace(). |
|
This configures the XMLReader to be used for reading the XML document.
The default implementation sets various options on the given XMLReader, such as validation, DTD resolution, entity handlers, etc., according to the options that were set (e.g. via |
|
This creates the SAXHandler that will be used to build the Document.
|
|
This creates the XMLReader to be used for reading the XML document. The default behavior is to (1) use the saxDriverClass, if it has been set, (2) try to obtain a parser from JAXP, if it is available, and (3) if all else fails, use a hard-coded default parser (currently the Xerces parser). Subclasses may override this method to determine the parser to use in a different way.
|
|
Returns the driver class assigned in the constructor, or null if none.
|
|
Returns the DTDHandler assigned, or null if none.
|
|
Returns the EntityResolver assigned, or null if none.
|
|
Returns the ErrorHandler assigned, or null if none.
|
|
Returns whether or not entities are being expanded into normal text content.
|
|
Returns the current org.jdom.JDOMFactory in use.
|
|
Returns whether element content whitespace is to be ignored during the build.
|
|
Returns whether the contained SAX parser instance is reused across multiple parses. The default is true.
|
|
Returns whether validation is to be performed during the build.
|
|
Returns the XMLFilter used during parsing, or null if none.
|
|
This sets custom DTDHandler for the
|
|
This sets custom EntityResolver for the
|
|
This sets custom ErrorHandler for the
|
|
This sets whether or not to expand entities for the builder. A true means to expand entities as normal content. A false means to leave entities unexpanded as When this setting is false, the internal DTD subset is retained; when this setting is true, the internal DTD subset is not retained. Note that Xerces (at least up to 1.4.4) has a bug where entities in attribute values will be misreported if this flag is turned off, resulting in entities to appear within element content. When turning entity expansion off either avoid entities in attribute values, or use another parser like Crimson. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6111
|
|
This sets a custom JDOMFactory for the builder. Use this to build the tree with your own subclasses of the JDOM classes.
|
|
This sets a feature on the SAX parser. See the SAX documentation for NOTE: SAXBuilder requires that some particular features of the SAX parser be set up in certain ways for it to work properly. The list of such features may change in the future. Therefore, the use of this method may cause parsing to break, and even if it doesn't break anything today it might break parsing in a future JDOM version, because what JDOM parsers require may change over time. Use with caution.
|
|
Specifies whether or not the parser should elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document. Only whitespace which is contained within element content that has an element only content model will be eliminated (see XML Rec 3.2.1). For this setting to take effect requires that validation be turned on. The default value of this setting is
|
|
This sets a property on the SAX parser. See the SAX documentation for more information. NOTE: SAXBuilder requires that some particular properties of the SAX parser be set up in certain ways for it to work properly. The list of such properties may change in the future. Therefore, the use of this method may cause parsing to break, and even if it doesn't break anything today it might break parsing in a future JDOM version, because what JDOM parsers require may change over time. Use with caution.
|
|
Specifies whether this builder shall reuse the same SAX parser when performing subsequent parses or allocate a new parser for each parse. The default value of this setting is Note: As SAX parser instances are not thread safe, the parser reuse feature should not be used with SAXBuilder instances shared among threads.
|
|
This sets validation for the builder.
|
|
This sets a custom org.xml.sax.XMLFilter for the builder.
|