com.mchange.v1.xml
Class DomParseUtils

java.lang.Object
  extended by com.mchange.v1.xml.DomParseUtils

public final class DomParseUtils
extends java.lang.Object


Method Summary
static java.lang.String allText(org.w3c.dom.Element elem)
           
static java.lang.String allText(org.w3c.dom.Element elem, boolean trim)
           
static java.lang.String allTextFromElement(org.w3c.dom.Element elem)
          Deprecated. use allText(Element elem)
static java.lang.String allTextFromElement(org.w3c.dom.Element elem, boolean trim)
          Deprecated. use allText(Element elem, boolean trim)
static java.lang.String[] allTextFromImmediateChildElements(org.w3c.dom.Element parent, java.lang.String tagName)
           
static java.lang.String[] allTextFromImmediateChildElements(org.w3c.dom.Element parent, java.lang.String tagName, boolean trim)
           
static java.lang.String allTextFromUniqueChild(org.w3c.dom.Element elem, java.lang.String childTagName)
           
static java.lang.String allTextFromUniqueChild(org.w3c.dom.Element elem, java.lang.String childTagName, boolean trim)
           
static java.lang.String allTextFromUniqueImmediateChild(org.w3c.dom.Element elem, java.lang.String childTagName)
           
static java.lang.String attrValFromElement(org.w3c.dom.Element element, java.lang.String attrName)
          Deprecated. use Element.getAttribute(String val)
static org.w3c.dom.NodeList getImmediateChildElementsByTagName(org.w3c.dom.Element parent, java.lang.String tagName)
          Deprecated. use immediateChildrenByTagName( Element parent, String tagName )
static org.w3c.dom.NodeList immediateChildElementsByTagName(org.w3c.dom.Element parent, java.lang.String tagName)
           
static org.w3c.dom.Element uniqueChild(org.w3c.dom.Element elem, java.lang.String childTagName)
           
static org.w3c.dom.Element uniqueChildByTagName(org.w3c.dom.Element elem, java.lang.String childTagName)
          Deprecated. use uniqueChild(Element elem, String childTagName)
static org.w3c.dom.Element uniqueImmediateChild(org.w3c.dom.Element elem, java.lang.String childTagName)
           
static org.w3c.dom.Element uniqueImmediateChildByTagName(org.w3c.dom.Element elem, java.lang.String childTagName)
          Deprecated. use uniqueImmediateChild(Element elem, String childTagName)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

allTextFromUniqueChild

public static java.lang.String allTextFromUniqueChild(org.w3c.dom.Element elem,
                                                      java.lang.String childTagName)
                                               throws org.w3c.dom.DOMException
Returns:
null if child doesn't exist.
Throws:
org.w3c.dom.DOMException

allTextFromUniqueChild

public static java.lang.String allTextFromUniqueChild(org.w3c.dom.Element elem,
                                                      java.lang.String childTagName,
                                                      boolean trim)
                                               throws org.w3c.dom.DOMException
Returns:
null if child doesn't exist.
Throws:
org.w3c.dom.DOMException

uniqueChild

public static org.w3c.dom.Element uniqueChild(org.w3c.dom.Element elem,
                                              java.lang.String childTagName)
                                       throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

uniqueChildByTagName

public static org.w3c.dom.Element uniqueChildByTagName(org.w3c.dom.Element elem,
                                                       java.lang.String childTagName)
                                                throws org.w3c.dom.DOMException
Deprecated. use uniqueChild(Element elem, String childTagName)

Throws:
org.w3c.dom.DOMException

allText

public static java.lang.String allText(org.w3c.dom.Element elem)
                                throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

allText

public static java.lang.String allText(org.w3c.dom.Element elem,
                                       boolean trim)
                                throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

allTextFromElement

public static java.lang.String allTextFromElement(org.w3c.dom.Element elem)
                                           throws org.w3c.dom.DOMException
Deprecated. use allText(Element elem)

Throws:
org.w3c.dom.DOMException

allTextFromElement

public static java.lang.String allTextFromElement(org.w3c.dom.Element elem,
                                                  boolean trim)
                                           throws org.w3c.dom.DOMException
Deprecated. use allText(Element elem, boolean trim)

Throws:
org.w3c.dom.DOMException

allTextFromImmediateChildElements

public static java.lang.String[] allTextFromImmediateChildElements(org.w3c.dom.Element parent,
                                                                   java.lang.String tagName)
                                                            throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

allTextFromImmediateChildElements

public static java.lang.String[] allTextFromImmediateChildElements(org.w3c.dom.Element parent,
                                                                   java.lang.String tagName,
                                                                   boolean trim)
                                                            throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

immediateChildElementsByTagName

public static org.w3c.dom.NodeList immediateChildElementsByTagName(org.w3c.dom.Element parent,
                                                                   java.lang.String tagName)
                                                            throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

getImmediateChildElementsByTagName

public static org.w3c.dom.NodeList getImmediateChildElementsByTagName(org.w3c.dom.Element parent,
                                                                      java.lang.String tagName)
                                                               throws org.w3c.dom.DOMException
Deprecated. use immediateChildrenByTagName( Element parent, String tagName )

Throws:
org.w3c.dom.DOMException

allTextFromUniqueImmediateChild

public static java.lang.String allTextFromUniqueImmediateChild(org.w3c.dom.Element elem,
                                                               java.lang.String childTagName)
                                                        throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

uniqueImmediateChild

public static org.w3c.dom.Element uniqueImmediateChild(org.w3c.dom.Element elem,
                                                       java.lang.String childTagName)
                                                throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

uniqueImmediateChildByTagName

public static org.w3c.dom.Element uniqueImmediateChildByTagName(org.w3c.dom.Element elem,
                                                                java.lang.String childTagName)
                                                         throws org.w3c.dom.DOMException
Deprecated. use uniqueImmediateChild(Element elem, String childTagName)

Throws:
org.w3c.dom.DOMException

attrValFromElement

public static java.lang.String attrValFromElement(org.w3c.dom.Element element,
                                                  java.lang.String attrName)
                                           throws org.w3c.dom.DOMException
Deprecated. use Element.getAttribute(String val)

Throws:
org.w3c.dom.DOMException