Package net.sf.saxon.sapling
Class Saplings
java.lang.Object
net.sf.saxon.sapling.Saplings
This is a non-instantiable class holding a number of convenience methods for creating
sapling nodes of different kinds.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic SaplingComment
Create a sapling comment node, with a given string valuestatic SaplingDocument
doc()
Create a sapling document node, with no childrenstatic SaplingDocument
Create a sapling document node with a specified base URI, with no childrenstatic SaplingElement
Create a sapling element node, in no namespace, with no attributes and no childrenstatic SaplingElement
Create a sapling element node, which may or may not be in a namespace, with no attributes and no childrenstatic SaplingProcessingInstruction
Create a sapling processing instruction node, with a given name and string valuestatic SaplingText
Create a sapling text node, with a given string value
-
Method Details
-
doc
Create a sapling document node, with no children- Returns:
- the new node
-
doc
Create a sapling document node with a specified base URI, with no children- Parameters:
baseUri
- the base URI of the document- Returns:
- the new node
-
elem
Create a sapling element node, in no namespace, with no attributes and no children- Parameters:
name
- the local name of the element node. This must be a valid NCName, but the current implementation does not check this.- Returns:
- the new node
-
elem
Create a sapling element node, which may or may not be in a namespace, with no attributes and no children- Parameters:
qName
- the qualified name of the element. The current implementation does not check that the parts of the qualified name are syntactically valid.- Returns:
- the new node
-
text
Create a sapling text node, with a given string value- Parameters:
value
- the string value of the text node- Returns:
- the new node
-
comment
Create a sapling comment node, with a given string value- Parameters:
value
- the string value of the comment node. This must not contain "--" as a substring, but the current implementation does not check this.- Returns:
- the new node
-
pi
Create a sapling processing instruction node, with a given name and string value- Parameters:
target
- the target (name) of the processing instruction. This must be a valid NCName, but the current implementation does not check this.data
- the string value of the processing instruction node. This must not contain"?>"
as a substring, but the current implementation does not check this.- Returns:
- the new node
-