public class XPNBuilder extends java.lang.Object implements ResultHandler
| Constructor and Description |
|---|
XPNBuilder()
Creates a new XPNBuilder
|
XPNBuilder(java.lang.String documentURI)
Creates a new XPNBuilder
|
| Modifier and Type | Method and Description |
|---|---|
void |
cdata(char[] chars,
int start,
int length)
Signals to receive CDATA characters
|
void |
characters(char[] chars,
int start,
int length)
Signals the start of characters
|
void |
comment(java.lang.String data)
Signals to recieve a comment
|
void |
endDocument()
Signals the end of the document
|
void |
endElement(java.lang.String name)
Signals the start of element
|
void |
endFragment() |
void |
entityReference(java.lang.String name)
Signals to recieve an entity reference with the given name
|
XPathNode |
getCurrentNode()
Returns the current node
|
XPathNode |
getRoot()
Returns the Root node
|
void |
ignorableWhitespace(char[] chars,
int start,
int length)
Signals the start of ignorable whitespace characters
|
boolean |
isFinished()
Returns true if the DOM builder has completed
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Signals to recieve a processing instruction
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
Sets the document locator
|
void |
setEscapeText(boolean escapeText)
Sets the behavoir of handling character content.
|
void |
setIndentSize(short indentSize)
Sets the indent size for all formatters that perform
serialization, in which indentation is applicable.
|
void |
setOutputFormat(OutputFormat format)
Sets the output format information for Formatters that
perform serialization.
|
void |
setSaveLocation(boolean saveLocation)
Sets whether or not to save location information.
|
void |
startDocument()
Signals the start of a document
|
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
Signals the start of element
|
XPathNode |
startFragment()
Starts a documentFragment and returns a handle to the fragment
This fragment won't be added to the DOM tree
|
void |
unescapedCharacters(char[] chars,
int start,
int length)
Signals to receive characters which should not be escaped
|
public XPNBuilder()
public XPNBuilder(java.lang.String documentURI)
public void cdata(char[] chars,
int start,
int length)
cdata in interface ResultHandlerchars - the character array containing the characters
to receivestart - the index into the character array to start receiving
characters atlength - the number of characters to recievepublic void characters(char[] chars,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.DocumentHandlerchars - the character array containing the characters
to receivestart - the index into the character array to start receiving
characters atlength - the number of characters to recieveorg.xml.sax.SAXExceptionpublic void comment(java.lang.String data)
ResultHandlercomment in interface ResultHandlerpublic void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String name)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.DocumentHandlername - the name of the elementatts - the AttributeList containing the associated
attributes for the elementorg.xml.sax.SAXExceptionpublic void entityReference(java.lang.String name)
entityReference in interface ResultHandlername - the name of the entity referencepublic XPathNode startFragment()
public void endFragment()
public XPathNode getCurrentNode()
public XPathNode getRoot()
public void ignorableWhitespace(char[] chars,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.DocumentHandlerchars - the character array containing the characters
to receivestart - the index into the character array to start receiving
characters atlength - the number of characters to recieveorg.xml.sax.SAXExceptionpublic boolean isFinished()
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.DocumentHandlertarget - the target of the processing instructiondata - the content of the processing instructionorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.DocumentHandlerlocator - the Locator used by this DocumentHandlerpublic void setEscapeText(boolean escapeText)
escapeText - the flag indicating whether or not to
escape character contentpublic void setIndentSize(short indentSize)
setIndentSize in interface ResultHandlerindentSize - the number of characters to indentpublic void setOutputFormat(OutputFormat format)
setOutputFormat in interface ResultHandlerformat - the OutputFormat used to specify properties
during serializationpublic void setSaveLocation(boolean saveLocation)
saveLocation - a boolean that when true, indicates that location
information should be saved if possible.public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXExceptionpublic void startElement(java.lang.String name,
org.xml.sax.AttributeList atts)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.DocumentHandlername - the name of the elementatts - the AttributeList containing the associated
attributes for the elementorg.xml.sax.SAXExceptionpublic void unescapedCharacters(char[] chars,
int start,
int length)
unescapedCharacters in interface ResultHandlerchars - the character array containing the characters
to receivestart - the index into the character array to start receiving
characters atlength - the number of characters to recieve