    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class xm.xm_NodeFormatter

    java.lang.Object
       |
       +----xm.xm_NodeFormatter

public abstract class xm_NodeFormatter
extends Object

Base for all classes which reformat xg_Nodes. Reformatting in this context means replacing certain whitespace to produce a more aesthetic result when viewing an XML source - although this class could be used as the base for derived classes which perform more radical transformations on a node.

##

xm_NodeFormatter()

##

format(xg_Node)
  Format the given node, and its children.
format(xg_Node, int)
  Format the given node, and its children.
formatChildren(xg_Node, int)
  Format the children of the given node, and its children.

##

xm_NodeFormatter

     public xm_NodeFormatter()

##

format

     public void format(xg_Node InputNode)

  Format the given node, and its children. Assume this a top-level node (typically a document).

  Parameters:
    InputNode - The node to reformat

format

     public abstract void format(xg_Node InputNode,
                                 int InputOpeningDepth)

  Format the given node, and its children.

  Parameters:
    InputNode - The node to reformat
    InputOpeningDepth - The depth of the node in the hierarchy. This allows a node to be reformatted to fit in with its surroundings (its parent and siblings). For a top-level node, this should be 0.

formatChildren

     public void formatChildren(xg_Node InputNode,
                                int InputOpeningDepth)

  Format the children of the given node, and its children.

  Parameters:
    InputNode - The node whose children are to be reformatted
    InputOpeningDepth - The depth of the node in the hierarchy. This allows a node to be reformatted to fit in with its surroundings (its parent and siblings). For a top-level node, this should be 0.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index