org.cyberneko.html.parsers
public class DOMFragmentParser extends Object implements XMLDocumentHandler
Version: $Id: DOMFragmentParser.java,v 1.8 2005/02/14 03:56:54 andyc Exp $
Field Summary | |
---|---|
protected static String | CURRENT_ELEMENT_NODE Current element node. |
protected static String | DOCUMENT_FRAGMENT Document fragment balancing only. |
protected static String | ERROR_HANDLER Property identifier: error handler. |
protected Node | fCurrentNode Current node. |
protected Document | fDocument Document. |
protected DocumentFragment | fDocumentFragment DOM document fragment. |
protected XMLDocumentSource | fDocumentSource Document source. |
protected boolean | fInCDATASection True if within a CDATA section. |
protected XMLParserConfiguration | fParserConfiguration Parser configuration. |
protected static String[] | RECOGNIZED_FEATURES Recognized features. |
protected static String[] | RECOGNIZED_PROPERTIES Recognized properties. |
Constructor Summary | |
---|---|
DOMFragmentParser() Default constructor. |
Method Summary | |
---|---|
void | characters(XMLString text, Augmentations augs) Characters. |
void | comment(XMLString text, Augmentations augs) Comment. |
void | doctypeDecl(String root, String pubid, String sysid, Augmentations augs) Document type declaration. |
void | emptyElement(QName element, XMLAttributes attrs, Augmentations augs) Empty element. |
void | endCDATA(Augmentations augs) End CDATA section. |
void | endDocument(Augmentations augs) End document. |
void | endElement(QName element, Augmentations augs) End element. |
void | endGeneralEntity(String name, Augmentations augs) End general entity. |
void | endPrefixMapping(String prefix, Augmentations augs) End prefix mapping. |
XMLDocumentSource | getDocumentSource() Returns the document source. |
ErrorHandler | getErrorHandler()
Return the current error handler.
|
boolean | getFeature(String featureId)
Query the state of a feature.
|
Object | getProperty(String propertyId)
Query the value of a property.
|
void | ignorableWhitespace(XMLString text, Augmentations augs) Ignorable whitespace. |
void | parse(String systemId, DocumentFragment fragment) Parses a document fragment. |
void | parse(InputSource source, DocumentFragment fragment) Parses a document fragment. |
void | processingInstruction(String target, XMLString data, Augmentations augs) Processing instruction. |
void | setDocumentSource(XMLDocumentSource source) Sets the document source. |
void | setErrorHandler(ErrorHandler errorHandler)
Allow an application to register an error event handler.
|
void | setFeature(String featureId, boolean state)
Set the state of any feature in a SAX2 parser. |
void | setProperty(String propertyId, Object value)
Set the value of any property in a SAX2 parser. |
void | startCDATA(Augmentations augs) Start CDATA section. |
void | startDocument(XMLLocator locator, String encoding, Augmentations augs) Start document. |
void | startDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs) Start document. |
void | startElement(QName element, XMLAttributes attrs, Augmentations augs) Start element. |
void | startGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) Start general entity. |
void | startPrefixMapping(String prefix, String uri, Augmentations augs) Start prefix mapping. |
void | textDecl(String version, String encoding, Augmentations augs) Text declaration. |
void | xmlDecl(String version, String encoding, String standalone, Augmentations augs) XML declaration. |
Returns: The current error handler, or null if none has been registered.
See Also: DOMFragmentParser
Parameters: featureId The unique identifier (URI) of the feature being set.
Returns: The current state of the feature.
Throws: org.xml.sax.SAXNotRecognizedException If the requested feature is not known. SAXNotSupportedException If the requested feature is known but not supported.
Parameters: propertyId The unique identifier (URI) of the property being set.
Returns: The current value of the property.
Throws: org.xml.sax.SAXNotRecognizedException If the requested property is not known. SAXNotSupportedException If the requested property is known but not supported.
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
Parameters: errorHandler The error handler.
Throws: java.lang.NullPointerException If the handler argument is null.
See Also: DOMFragmentParser
Parameters: featureId The unique identifier (URI) of the feature. state The requested state of the feature (true or false).
Throws: SAXNotRecognizedException If the requested feature is not known. SAXNotSupportedException If the requested feature is known, but the requested state is not supported.
Parameters: propertyId The unique identifier (URI) of the property being set. value The value to which the property is being set.
Throws: SAXNotRecognizedException If the requested property is not known. SAXNotSupportedException If the requested property is known, but the requested value is not supported.