|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.dom.DOMInfo
Methods to print information out about a DOM. Used for debugging, etc. Has special handling for Lazy DOMs to prevent expansion.
Field Summary | |
static int |
ALL_ATTRS
Print all attributes, even unspecified ones. |
protected DOMInfoPrinter |
fInfoPrinter
|
protected int |
fOptions
Options to use. |
protected PrintWriter |
fOut
Write for output. |
protected DOMTraversal |
fTraverser
DOM traversal object and handler. |
static int |
PRINT_ALL
All Print options, except NO_RECURSION. |
static int |
PRINT_ATTR_DETAILS
Print attributes as the Nodes that represent them. |
static int |
PRINT_DEFAULT
Default print options. |
static int |
SYM_TEXT_LINEBREAKS
Print newlines and carriage returns as \n and \r, avoiding linebreaks in text |
static int |
TRUNCATE_TEXT
Truncate text, comments etc, to 16 chars. |
Constructor Summary | |
protected |
DOMInfo(int options,
DOMTraversal traverser,
DOMInfoPrinter infoPrinter,
PrintWriter out)
Constructor for derived objects. |
Method Summary | |
static int |
getTraverserOptions(int options)
Get traverser options from DOMInfo options. |
static String |
nodeTypeToName(short type)
Convert a node type to a name. |
static void |
printTree(String msg,
Node root)
Print a DOM node an its children to stderr.. |
static void |
printTree(String msg,
Node root,
int options,
PrintWriter out)
Print a DOM node and its children. |
static void |
printTree(String msg,
Node root,
OutputStream out)
Print a DOM node an its children. |
static void |
printTree(String msg,
Node root,
PrintWriter out)
Print a DOM node an its children. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int PRINT_ATTR_DETAILS
public static final int ALL_ATTRS
public static final int SYM_TEXT_LINEBREAKS
public static final int TRUNCATE_TEXT
public static final int PRINT_ALL
public static final int PRINT_DEFAULT
protected int fOptions
protected PrintWriter fOut
protected DOMTraversal fTraverser
protected DOMInfoPrinter fInfoPrinter
Constructor Detail |
protected DOMInfo(int options, DOMTraversal traverser, DOMInfoPrinter infoPrinter, PrintWriter out)
Method Detail |
public static int getTraverserOptions(int options)
public static String nodeTypeToName(short type)
public static void printTree(String msg, Node root, int options, PrintWriter out)
msg
- A message to print at the start. If null or empty,
don't print a message.root
- Top of the tree.options
- Set of print options.out
- Output writer. If null, stderr will be used.public static void printTree(String msg, Node root, PrintWriter out)
msg
- A message to print at the start. If null or empty,
don't print a message.node
- Top of the tree.out
- Output writer. If null, stderr will be used.public static void printTree(String msg, Node root, OutputStream out)
msg
- A message to print at the start. If null or empty,
don't print a message.root
- Top of the tree.out
- Output stream. If null, stderr will be used.public static void printTree(String msg, Node root)
msg
- A message to print at the start. If null or empty,
don't print a message.root
- Top of the tree.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |