Public Member Functions | |
SAXHandler () | |
SAXHandler (JDOMFactory factory) | |
Document | getDocument () |
JDOMFactory | getFactory () |
void | setExpandEntities (boolean expand) |
boolean | getExpandEntities () |
void | setIgnoringElementContentWhitespace (boolean ignoringWhite) |
boolean | getIgnoringElementContentWhitespace () |
void | externalEntityDecl (String name, String publicID, String systemID) throws SAXException |
void | attributeDecl (String eName, String aName, String type, String valueDefault, String value) throws SAXException |
void | elementDecl (String name, String model) throws SAXException |
void | internalEntityDecl (String name, String value) throws SAXException |
void | processingInstruction (String target, String data) throws SAXException |
void | skippedEntity (String name) throws SAXException |
void | startPrefixMapping (String prefix, String uri) throws SAXException |
void | startElement (String namespaceURI, String localName, String qName, Attributes atts) throws SAXException |
void | characters (char[] ch, int start, int length) throws SAXException |
void | ignorableWhitespace (char[] ch, int start, int length) throws SAXException |
void | endElement (String namespaceURI, String localName, String qName) throws SAXException |
void | startDTD (String name, String publicID, String systemID) throws SAXException |
void | endDTD () throws SAXException |
void | startEntity (String name) throws SAXException |
void | endEntity (String name) throws SAXException |
void | startCDATA () throws SAXException |
void | endCDATA () throws SAXException |
void | comment (char[] ch, int start, int length) throws SAXException |
void | notationDecl (String name, String publicID, String systemID) throws SAXException |
void | unparsedEntityDecl (String name, String publicID, String systemID, String notationName) throws SAXException |
void | setDocumentLocator (Locator locator) |
Locator | getDocumentLocator () |
Protected Member Functions | |
void | flushCharacters () throws SAXException |
void | appendExternalId (String publicID, String systemID) |
Element | getCurrentElement () throws SAXException |
Protected Attributes | |
Element | currentElement |
boolean | atRoot |
boolean | inDTD = false |
boolean | inInternalSubset = false |
boolean | previousCDATA = false |
boolean | inCDATA = false |
boolean | suppress = false |
List | declaredNamespaces |
Static Package Functions | |
[static initializer] |
SAXHandler
supports SAXBuilder.
Jason Hunter
Philip Nelson
Bradley S. Huffman
|
This will create a new |
|
This will create a new
|
|
Class initializer: Populate a table to translate SAX attribute type names into JDOM attribute type value (integer). Note that all the mappings defined below are compliant with the SAX 2.0 specification exception for "ENUMERATION" with is specific to Crimson 1.1.X and Xerces 2.0.0-betaX which report attributes of enumerated types with a type "ENUMERATION" instead of the expected "NMTOKEN". Note also that Xerces 1.4.X is not SAX 2.0 compliant either but handling its case requires specific code. |
|
Appends an external ID to the internal subset buffer. Either publicID or systemID may be null, but not both.
|
|
This handles an attribute declaration in the internal subset.
|
|
This will report character data (within an element).
|
|
This reports that a comments is parsed. If not in the DTD, this comment is added to the current JDOM
|
|
Handle an element declaration in a DTD.
|
|
Report a CDATA section - ignored in SAXBuilder. |
|
This signifies that the reading of the DTD is complete. |
|
Indicates the end of an element (
|
|
This is called when the parser encounters an external entity declaration.
|
|
This will flush any characters from SAX character calls we've been buffering.
|
|
Returns the being-parsed element.
|
|
Returns the document. Should be called after parsing is complete.
|
|
Provides access to the Locator object provided by the SAX parser.
|
|
Returns whether or not entities will be expanded during the build.
|
|
Returns the factory used for constructing objects.
|
|
Returns whether or not the parser will elminate whitespace in element content (sometimes known as "ignorable whitespace") when building the document.
|
|
Capture ignorable whitespace as text. If setIgnoringElementContentWhitespace(true) has been called then this method does nothing.
|
|
Handle an internal entity declaration in a DTD.
|
|
Handle the declaration of a Notation in a DTD
|
|
This will indicate that a processing instruction has been encountered. (The XML declaration is not a processing instruction and will not be reported.)
|
|
Receives an object for locating the origin of SAX document events. This method is invoked by the SAX parser. JDOMFactory implementations can use the getDocumentLocator method to get access to the Locator during parse.
|
|
This sets whether or not to expand entities during the build. A true means to expand entities as normal content. A false means to leave entities unexpanded as
|
|
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 indicates that an unresolvable entity reference has been encountered, normally because the external DTD subset has not been read.
|
|
Report a CDATA section - ignored in SAXBuilder. |
|
This will signify that a DTD is being parsed, and can be used to ensure that comments and other lexical structures in the DTD are not added to the JDOM
|
|
This reports the occurrence of an actual element. It will include the element's attributes, with the exception of XML vocabulary specific attributes, such as
|
|
if no current element, this entity belongs to an attribute in these cases, it is an error on the part of the parser to call startEntity but this will help in some cases. See org/xml/sax/ext/LexicalHandler.html::startEntity(java.lang.String) for more information |
|
This will add the prefix mapping to the JDOM
|
|
Handler for unparsed entity declarations in the DTD
|
|
Indicator of where in the document we are |
|
|
|
Temporary holder for namespaces that have been declared with startPrefixMapping, but are not yet available on the element |
|
Indicator of whether we are in a CDATA |
|
Indicator of whether we are in the DocType. Note that the DTD consists of both the internal subset (inside the <!DOCTYPE> tag) and the external subset (in a separate .dtd file). |
|
Indicator of whether we are in the internal subset |
|
Indicator of whether we previously where in a CDATA |
|
Indicator of whether we are actively suppressing (non-expanding) a current entity |