gnu.xml

Class TextUtils


public class TextUtils
extends java.lang.Object

Method Summary

static String
asString(Object node)
static String
replaceWhitespace(String str, boolean collapse)
Create a normalized string.
static String
stringValue(Object node)
static void
stringValue(Object node, StringBuffer sbuf)
static void
textValue(Object arg, Consumer out)

Method Details

asString

public static String asString(Object node)

replaceWhitespace

public static String replaceWhitespace(String str,
                                       boolean collapse)
Create a normalized string.
Returns:
the original string if it was normalized; otherwise a fresh one. (XStringType.matcyhes assumes the above.)

stringValue

public static String stringValue(Object node)

stringValue

public static void stringValue(Object node,
                               StringBuffer sbuf)

textValue

public static void textValue(Object arg,
                             Consumer out)