
Traverse the in-memory tree and build an XML representation for the tree. Leaving asside white space, this XML should be the same as the original XML that was read to build the tree. Or at least the same relative to the supported XML elements. For example, the TreeBuilder code does not support the "documentation" elements (DOCDECL).
Public Member Functions | |
| TreeToXML (TreeNode root) | |
| String | toString () |
Private Member Functions | |
| void | indent () |
| void | openTag () |
| void | closeTag (boolean first) |
| void | serializeAttribute (Attribute attr) |
| void | serializeTag (TreeNode node) |
| void | serializeNode (TreeNode node) |
| void | endTag (TreeNode root) |
| void | leavesToString (TreeNode root) |
| void | rootToString (TreeNode root) |
Private Attributes | |
| TreeNode | mRoot |
| StringBuffer | mBuf = null |
| final int | INDENT = 4 |
| int | mIndentLevel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.8