cdqa.dom
Class TextUtils

java.lang.Object
  extended by cdqa.dom.TextUtils

final class TextUtils
extends java.lang.Object

TextUtils class

Author:
simonkm

Constructor Summary
TextUtils()
           
 
Method Summary
static void appendIgnoreWhiteSpace(java.lang.String string, java.lang.StringBuffer stringBuffer)
          appends a string to a stringBuffer, ignoring XML whitespaces
static StringStack childStringStack(org.w3c.dom.Node node)
           
static java.lang.String childText(org.w3c.dom.Node node)
          returns the child text of this node
static StringStack descStringStack(org.w3c.dom.Node node)
           
static java.lang.String descText(org.w3c.dom.Node node)
          returns the descendant text of this node
static java.lang.String stackToStringIgnoreWhiteSpace(StringStack stringStack)
          converts a stringStack into a string
static java.lang.String textNodeValue(org.w3c.dom.Node n)
          If n is not a Text Node, returns null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextUtils

TextUtils()
Method Detail

textNodeValue

public static java.lang.String textNodeValue(org.w3c.dom.Node n)
If n is not a Text Node, returns null. If n is a Text Node that contains only whitespaces, returns null. Otherwise, returns n.getNodeValue().


childText

public static java.lang.String childText(org.w3c.dom.Node node)
returns the child text of this node


descText

public static java.lang.String descText(org.w3c.dom.Node node)
returns the descendant text of this node


appendIgnoreWhiteSpace

public static void appendIgnoreWhiteSpace(java.lang.String string,
                                          java.lang.StringBuffer stringBuffer)
appends a string to a stringBuffer, ignoring XML whitespaces


stackToStringIgnoreWhiteSpace

public static java.lang.String stackToStringIgnoreWhiteSpace(StringStack stringStack)
converts a stringStack into a string


descStringStack

public static StringStack descStringStack(org.w3c.dom.Node node)
Parameters:
node -
Returns:

childStringStack

public static StringStack childStringStack(org.w3c.dom.Node node)
Parameters:
node -
Returns: