Public Member Functions | |
| SAXHandler (Document document) throws IOException | |
| SAXHandler () throws IOException | |
| SAXHandler (JDOMFactory factory) throws IOException | |
| 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 | endPrefixMapping (String prefix) 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 |
| Element | getCurrentElement () throws SAXException |
Protected Attributes | |
| Stack | stack |
| boolean | atRoot |
| boolean | inDTD = false |
| boolean | inInternalSubset = false |
| boolean | previousCDATA = false |
| boolean | inCDATA = false |
| boolean | suppress = false |
| LinkedList | declaredNamespaces |
| LinkedList | availableNamespaces |
Static Package Functions | |
| [static initializer] | |
SAXHandler supports SAXBuilder
Jason Hunter
Philip Nelson
Bradley S. Huffman
|
|
This will set the
|
|
|
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 Crinsom 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. |
|
||||||||||||||||||||||||
|
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 will add the prefix mapping to the JDOM
|
|
||||||||||||||||
|
This is called when the parser encounters an external entity declaration.
|
|
|
This will flush any characters from SAX character calls we've been buffering.
This is commented out because of some problems with the inline DTDs that Xerces seems to have. if (!inDTD) { if (inEntity) { getCurrentElement().setContent(factory.text(data)); } else { getCurrentElement().addContent(factory.text(data)); } |
|
|
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
I've commented out these lines to ensure that element's that have a namespace make those namespaces available to their attributes, which this seems to break. However, I'm not 100% sure that this doesn't cause some other problems. My gut feeling is "no", but I'm not sure, so I'm just commenting it out. We'll remove for good in the next drop I think.
|
|
|
|
|
||||||||||||
|
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 |
|
|
The namespaces in scope and actually attached to an element |
|
|
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 |
|
|
Indicator of whether we are in the internal subset |
|
|
Indicator of whether we previously where in a CDATA |
|
|
Element stack |
|
|
Indicator of whether we are actively suppressing (non-expanding) a current entity |
1.3.7