textbender.g.xml.dom
Class DOM

java.lang.Object
  extended by DOM

public final class DOM
extends Object

Grab-bag of utilities for DOM.


Method Summary
static StringBuilder buildAttributePrefix(Node context, String namespaceURI, StringBuilder b)
          Builds a namespace prefix for an attribute, to which the attribute name may be appended.
static StringBuilder buildElementPrefix(Node context, String namespaceURI, StringBuilder b)
          Builds a namespace prefix for an element, to which the element name may be appended.
static StringBuilder buildPrefix(Node context, String namespaceURI, StringBuilder b, boolean isForElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildAttributePrefix

public static StringBuilder buildAttributePrefix(Node context,
                                                 String namespaceURI,
                                                 StringBuilder b)
Builds a namespace prefix for an attribute, to which the attribute name may be appended.

Parameters:
context - node, for prefix lookup
namespaceURI - to which the prefix refers
b - string builder to use, overwriting its existing content
Returns:
reference to b, containing the prefix, complete with trailing ':'

buildElementPrefix

public static StringBuilder buildElementPrefix(Node context,
                                               String namespaceURI,
                                               StringBuilder b)
Builds a namespace prefix for an element, to which the element name may be appended.

Parameters:
context - node, for prefix lookup
namespaceURI - to which the prefix refers
b - string builder to use, overwriting its existing content
Returns:
reference to b, containing the prefix, complete with trailing ':'

buildPrefix

public static StringBuilder buildPrefix(Node context,
                                        String namespaceURI,
                                        StringBuilder b,
                                        boolean isForElement)