net.sf.saxon.tinytree

Class WhitespaceTextImpl

public final class WhitespaceTextImpl extends TinyNodeImpl

A node in the XML parse tree representing a text node with compressed whitespace content

Author: Michael H. Kay

Constructor Summary
WhitespaceTextImpl(TinyTree tree, int nodeNr)
Method Summary
voidcopy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)
Copy this node to a given outputter
intgetNodeKind()
Return the type of node.
StringgetStringValue()
Return the character value of the node.
static CharSequencegetStringValue(TinyTree tree, int nodeNr)
Static method to get the string value of a text node without first constructing the node object
CharSequencegetStringValueCS()
Get the value of the item as a CharSequence.

Constructor Detail

WhitespaceTextImpl

public WhitespaceTextImpl(TinyTree tree, int nodeNr)

Method Detail

copy

public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)
Copy this node to a given outputter

getNodeKind

public final int getNodeKind()
Return the type of node.

Returns: Type.TEXT

getStringValue

public String getStringValue()
Return the character value of the node.

Returns: the string value of the node

getStringValue

public static CharSequence getStringValue(TinyTree tree, int nodeNr)
Static method to get the string value of a text node without first constructing the node object

Parameters: tree the tree nodeNr the node number of the text node

Returns: the string value of the text node

getStringValueCS

public CharSequence getStringValueCS()
Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.