com.ibm.workflow.upes
Class DOMUtils

java.lang.Object
  |
  +--com.ibm.workflow.upes.DOMUtils

public class DOMUtils
extends java.lang.Object

Some utility functions in order to simplify coding.


Constructor Summary
DOMUtils()
           
 
Method Summary
static java.lang.String getChildCharacterData(org.w3c.dom.Element parentEl)
          Concat all the text and cdata node children of this elem and return the resulting text.
static org.w3c.dom.Element getElementByTagName(org.w3c.dom.Element elem, java.lang.String tagName)
          Return the first child element with a given name of the given element.
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element elem)
          Return the first child element of the given element.
static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element elem)
          Return the next sibling element of the given element.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

DOMUtils

public DOMUtils()
Method Detail

getChildCharacterData

public static java.lang.String getChildCharacterData(org.w3c.dom.Element parentEl)
Concat all the text and cdata node children of this elem and return the resulting text.
Parameters:
parentEl - the element whose cdata/text node values are to be combined.
Returns:
the concatanated string.

getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element elem)
Return the first child element of the given element. Null if no children are found.
Parameters:
elem - Element whose child is to be returned
Returns:
the first child element.

getElementByTagName

public static org.w3c.dom.Element getElementByTagName(org.w3c.dom.Element elem,
                                                      java.lang.String tagName)
Return the first child element with a given name of the given element. Null if no children are found.
Parameters:
elem - Element whose child is to be returned
Returns:
the first child element.

getNextSiblingElement

public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element elem)
Return the next sibling element of the given element. Null if no more sibling elements are found.
Parameters:
elem - Element whose sibling element is to be returned
Returns:
the next sibling element.