|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectXMLWriter
public class XMLWriter
Simple utility class that takes a Node or Source (representing an XML document) and produces an indented string representation of it. This is very useful for debugging.
Constructor Summary | |
---|---|
XMLWriter()
|
Method Summary | |
---|---|
static void |
debug(EasyNode node)
Prints the node, in XML format, to Trace.debug() |
static void |
debug(EasyNode node,
boolean includeXMLDecl)
Prints the node, in XML format, to Trace.debug() |
static void |
debug(Source node)
Prints the node, in XML format, to Trace.debug() |
static void |
debug(Source node,
boolean includeXMLDecl)
Prints the node, in XML format, to Trace.debug() |
static String |
toString(EasyNode node)
Format a nice, multi-line, indented, representation of the given XML fragment. |
static String |
toString(EasyNode node,
boolean includeXMLDecl)
Format a nice, multi-line, indented, representation of the given XML fragment. |
static String |
toString(Source node)
Format a nice, multi-line, indented, representation of the given XML fragment. |
static String |
toString(Source node,
boolean includeXMLDecl)
Format a nice, multi-line, indented, representation of the given XML fragment. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLWriter()
Method Detail |
---|
public static void debug(EasyNode node)
public static void debug(EasyNode node, boolean includeXMLDecl)
public static void debug(Source node)
public static void debug(Source node, boolean includeXMLDecl)
public static String toString(EasyNode node)
node
- Base node to format.public static String toString(EasyNode node, boolean includeXMLDecl)
node
- Base node to format.public static String toString(Source node)
node
- Base node to format.public static String toString(Source node, boolean includeXMLDecl)
node
- Base node to format.includeXMLDecl
- true to include XML declaration, false to
suppress it (useful for generating a fragment
of XML to insert within a larger document.)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |