class SAXModifyContentHandler extends SAXContentHandler
org.dom4.ElementHandler
is still
handling the current Element.SAXContentHandler
Constructor and Description |
---|
SAXModifyContentHandler() |
SAXModifyContentHandler(DocumentFactory documentFactory) |
SAXModifyContentHandler(DocumentFactory documentFactory,
ElementHandler elementHandler) |
SAXModifyContentHandler(DocumentFactory documentFactory,
ElementHandler elementHandler,
ElementStack elementStack) |
Modifier and Type | Method and Description |
---|---|
private boolean |
activeHandlers() |
void |
characters(char[] parm1,
int parm2,
int parm3) |
void |
comment(char[] characters,
int parm2,
int parm3) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName) |
void |
endEntity(java.lang.String name) |
void |
endPrefixMapping(java.lang.String prefix) |
protected XMLWriter |
getXMLWriter() |
void |
ignorableWhitespace(char[] parm1,
int parm2,
int parm3) |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Receive notification of a notation declaration event.
|
void |
processingInstruction(java.lang.String target,
java.lang.String data) |
void |
setDocumentLocator(org.xml.sax.Locator locator) |
void |
setXMLWriter(XMLWriter writer) |
void |
skippedEntity(java.lang.String name) |
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId) |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts) |
void |
startEntity(java.lang.String name) |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notation)
Receive notification of an unparsed entity declaration event.
|
addAttributes, addDeclaredNamespaces, addDTDDeclaration, addExternalDTDDeclaration, attributeDecl, completeCurrentTextNode, createDocument, createElementStack, elementDecl, error, externalEntityDecl, fatalError, getDocument, getElementStack, getEntityResolver, getInputSource, internalEntityDecl, isIgnorableEntity, isIgnoreComments, isIncludeExternalDTDDeclarations, isIncludeInternalDTDDeclarations, isMergeAdjacentText, isStripWhitespaceText, setElementStack, setEntityResolver, setIgnoreComments, setIncludeExternalDTDDeclarations, setIncludeInternalDTDDeclarations, setInputSource, setMergeAdjacentText, setStripWhitespaceText, warning
private XMLWriter xmlWriter
public SAXModifyContentHandler()
public SAXModifyContentHandler(DocumentFactory documentFactory)
public SAXModifyContentHandler(DocumentFactory documentFactory, ElementHandler elementHandler)
public SAXModifyContentHandler(DocumentFactory documentFactory, ElementHandler elementHandler, ElementStack elementStack)
public void setXMLWriter(XMLWriter writer)
public void startCDATA() throws org.xml.sax.SAXException
startCDATA
in interface org.xml.sax.ext.LexicalHandler
startCDATA
in class SAXContentHandler
org.xml.sax.SAXException
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
startDTD
in interface org.xml.sax.ext.LexicalHandler
startDTD
in class SAXContentHandler
org.xml.sax.SAXException
public void endDTD() throws org.xml.sax.SAXException
endDTD
in interface org.xml.sax.ext.LexicalHandler
endDTD
in class SAXContentHandler
org.xml.sax.SAXException
public void comment(char[] characters, int parm2, int parm3) throws org.xml.sax.SAXException
comment
in interface org.xml.sax.ext.LexicalHandler
comment
in class SAXContentHandler
org.xml.sax.SAXException
public void startEntity(java.lang.String name) throws org.xml.sax.SAXException
startEntity
in interface org.xml.sax.ext.LexicalHandler
startEntity
in class SAXContentHandler
org.xml.sax.SAXException
public void endCDATA() throws org.xml.sax.SAXException
endCDATA
in interface org.xml.sax.ext.LexicalHandler
endCDATA
in class SAXContentHandler
org.xml.sax.SAXException
public void endEntity(java.lang.String name) throws org.xml.sax.SAXException
endEntity
in interface org.xml.sax.ext.LexicalHandler
endEntity
in class SAXContentHandler
org.xml.sax.SAXException
public void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notation) throws org.xml.sax.SAXException
SAXContentHandler
Note that the notation name corresponds to a notation reported by the
notationDecl
event. It is up to the application to
record the entity for later reference, if necessary.
If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
unparsedEntityDecl
in interface org.xml.sax.DTDHandler
unparsedEntityDecl
in class SAXContentHandler
name
- The unparsed entity's name.publicId
- The entity's public identifier, or null if none was given.systemId
- The entity's system identifier.notation
- The name of the associated notation.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.SAXContentHandler.notationDecl(java.lang.String, java.lang.String, java.lang.String)
,
AttributeList
public void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
SAXContentHandler
It is up to the application to record the notation for later reference, if necessary.
At least one of publicId and systemId must be non-null. If a system identifier is present, and it is a URL, the SAX parser must resolve it fully before passing it to the application through this event.
There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.
notationDecl
in interface org.xml.sax.DTDHandler
notationDecl
in class SAXContentHandler
name
- The notation name.publicId
- The notation's public identifier, or null if none was given.systemId
- The notation's system identifier, or null if none was given.org.xml.sax.SAXException
- Any SAX exception, possibly wrapping another exception.SAXContentHandler.unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,
AttributeList
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class SAXContentHandler
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class SAXContentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] parm1, int parm2, int parm3) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
processingInstruction
in class SAXContentHandler
org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class SAXContentHandler
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
skippedEntity
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class SAXContentHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
startPrefixMapping
in class SAXContentHandler
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class SAXContentHandler
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
endPrefixMapping
in class SAXContentHandler
org.xml.sax.SAXException
public void characters(char[] parm1, int parm2, int parm3) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class SAXContentHandler
org.xml.sax.SAXException
protected XMLWriter getXMLWriter()
private boolean activeHandlers()