public class SaxonBuilder extends Object
Receiver| Constructor and Description |
|---|
SaxonBuilder(net.sf.saxon.Configuration configuration)
Creates a new builder based on the given Saxon configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(net.sf.saxon.s9api.QName qname,
String value)
Adds an attribute to the current element.
|
void |
comment(String comment)
Adds a new comment node.
|
void |
endDocument()
Ends the document node.
|
void |
endElement()
Ends the current element node.
|
net.sf.saxon.s9api.XdmNode |
getNode()
Returns the result node built by this builder.
|
void |
namespace(String prefix,
String uri)
Declares a new namespace in the current element
|
void |
nodes(Iterable<net.sf.saxon.s9api.XdmNode> nodes)
Appends the given nodes to the document being built.
|
void |
nodes(net.sf.saxon.s9api.XdmNode... nodes)
Appends the given nodes to the document being built.
|
void |
processingInstruction(String name,
String data)
Adds a processing instruction.
|
void |
raw(String raw,
net.sf.saxon.s9api.Processor processor)
Adds a raw XML fragment
|
void |
startContent()
Starts the content of the current element.
|
void |
startDocument()
Starts a document node.
|
void |
startElement(net.sf.saxon.s9api.QName qname)
Starts a new element with the given QName.
|
void |
startElement(net.sf.saxon.s9api.QName qname,
net.sf.saxon.s9api.XdmNode nsContext)
Start a new element with the given QName, and adds the in-scope
namespaces of the given node to the new element.
|
void |
text(String text)
Adds a text node
|
public SaxonBuilder(net.sf.saxon.Configuration configuration)
configuration - The Saxon configuration. In particular, the name pool of the
configuration will be used to construct the new item codes.public void startDocument()
public void endDocument()
public void startElement(net.sf.saxon.s9api.QName qname)
qname - The QName of the new element.public void startElement(net.sf.saxon.s9api.QName qname,
net.sf.saxon.s9api.XdmNode nsContext)
qname - The QName of the new element.nsContext - A node whose in-scope namespaces are copied to the new
element.public void endElement()
public void startContent()
public void attribute(net.sf.saxon.s9api.QName qname,
String value)
qname - The QName of the attributevalue - The value of the attributepublic void comment(String comment)
comment - The comment textpublic void namespace(String prefix, String uri)
prefix - The namespace prefixuri - The namespace URIpublic void nodes(net.sf.saxon.s9api.XdmNode... nodes)
public void nodes(Iterable<net.sf.saxon.s9api.XdmNode> nodes)
public void processingInstruction(String name, String data)
name - The processing instruction namedata - The processing instruction datapublic void text(String text)
text - The text contentpublic void raw(String raw, net.sf.saxon.s9api.Processor processor)
raw - The XML fragmentpublic net.sf.saxon.s9api.XdmNode getNode()
Copyright © 2009-2012 TranceCode. All Rights Reserved.