public class TreeBuilder extends Builder
columnNumber, controller, currentDocument, discardComments, errorHandler, errorListener, errorOutput, estimatedLength, failed, inDTD, lineNumber, lineNumbering, previewManager, STANDARD_TREE, started, stripper, timing, TINY_TREE
locator, namePool, outputProperties, outputStream, systemId, writer
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
Constructor and Description |
---|
TreeBuilder()
create a Builder and initialise variables
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Callback interface for SAX: not for application use
|
void |
comment(char[] ch,
int start,
int length)
Callback interface for SAX (part of LexicalHandler interface): not for application use
|
void |
endDocument()
Callback interface for SAX: not for application use
|
void |
endElement(int nameCode)
Callback interface for SAX: not for application use
|
void |
graftElement(ElementImpl element)
graftElement() allows an element node to be transferred from one tree to another.
|
void |
processingInstruction(String name,
String remainder)
Callback interface for SAX: not for application use
Note: because SAX1 does not deliver comment nodes, we get these in the form of a processing instruction with a null name. |
void |
setDocumentLocator(Locator locator)
Callback interface for SAX: not for application use
|
void |
setNodeFactory(NodeFactory factory)
Set the Node Factory to use.
|
void |
setUnparsedEntity(String name,
String uri)
Set an unparsed entity URI for the document
|
void |
startDocument()
Callback interface for SAX: not for application use
|
void |
startElement(int nameCode,
Attributes attributes,
int[] namespaces,
int namespacesUsed)
Callback interface for SAX: not for application use
|
build, error, fatalError, getColumnNumber, getCurrentDocument, getLineNumber, getPublicId, getStripper, isTiming, reportError, setController, setDiscardCommentsAndPIs, setErrorHandler, setErrorListener, setErrorOutput, setLineNumbering, setPreviewManager, setRootNode, setStripper, setTiming, warning
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setWriter, usesWriter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSystemId
getSystemId
public void setNodeFactory(NodeFactory factory)
public void startDocument() throws TransformerException
startDocument
in class Emitter
TransformerException
public void endDocument() throws TransformerException
endDocument
in class Emitter
TransformerException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in class Emitter
public void startElement(int nameCode, Attributes attributes, int[] namespaces, int namespacesUsed) throws TransformerException
startElement
in class Emitter
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnamespacesUsed
- Number of significant entries within namespaces arrayTransformerException
public void endElement(int nameCode) throws TransformerException
endElement
in class Emitter
TransformerException
public void characters(char[] ch, int start, int length) throws TransformerException
characters
in class Emitter
TransformerException
public void processingInstruction(String name, String remainder)
processingInstruction
in class Emitter
public void comment(char[] ch, int start, int length) throws TransformerException
comment
in class Emitter
TransformerException
public void graftElement(ElementImpl element) throws TransformerException
TransformerException
public void setUnparsedEntity(String name, String uri)
setUnparsedEntity
in class Builder