net.sf.saxon.tree
Class TreeBuilder
public
class
TreeBuilder
extends Builder
The Builder class is responsible for taking a stream of SAX events and constructing
a Document tree.
Author: Michael H. Kay
Method Summary |
void | attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) |
void | characters(CharSequence chars, int locationId, int properties)
Notify a text node. |
void | close()
Callback interface for SAX: not for application use |
void | comment(CharSequence chars, int locationId, int properties)
Notify a comment |
void | endElement()
Notify the end of an element |
void | graftElement(ElementImpl element)
graftElement() allows an element node to be transferred from one tree to another.
|
void | namespace(int namespaceCode, int properties) |
void | open()
Callback interface for SAX: not for application use |
void | processingInstruction(String name, CharSequence remainder, int locationId, int properties)
Notify a processing instruction |
void | setNodeFactory(NodeFactory factory)
Set the Node Factory to use. |
void | setUnparsedEntity(String name, String uri, String publicId)
Set an unparsed entity URI for the document |
void | startContent() |
void | startElement(int nameCode, int typeCode, int locationId, int properties)
Notify the start of an element |
public TreeBuilder()
create a Builder and initialise variables
public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
public void characters(CharSequence chars, int locationId, int properties)
Notify a text node. Adjacent text nodes must have already been merged
public void close()
Callback interface for SAX: not for application use
public void comment(CharSequence chars, int locationId, int properties)
Notify a comment
public void endElement()
Notify the end of an element
graftElement() allows an element node to be transferred from one tree to another.
This is a dangerous internal interface which is used only to contruct a stylesheet
tree from a stylesheet using the "literal result element as stylesheet" syntax.
The supplied element is grafted onto the current element as its only child.
public void namespace(int namespaceCode, int properties)
public void open()
Callback interface for SAX: not for application use
public void processingInstruction(String name, CharSequence remainder, int locationId, int properties)
Notify a processing instruction
Set the Node Factory to use. If none is specified, the Builder uses its own.
public void setUnparsedEntity(String name, String uri, String publicId)
Set an unparsed entity URI for the document
public void startContent()
public void startElement(int nameCode, int typeCode, int locationId, int properties)
Notify the start of an element