org.jboss.webservice.util
Class DOMUtils

java.lang.Object
  extended byorg.jboss.webservice.util.DOMUtils

public final class DOMUtils
extends java.lang.Object

A utility class for common w3c DOM operations.

Since:
15-May-2004

Method Summary
static java.lang.String getAttributeValue(org.w3c.dom.Element el, java.lang.String attrName)
          Get the value from the given attribute
static boolean getAttributeValueAsBoolean(org.w3c.dom.Element el, java.lang.String attrName)
          Get the boolean value from the given attribute
static QName (src) getAttributeValueAsQName(org.w3c.dom.Element el, java.lang.String attrName)
          Get the qname value from the given attribute
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element el)
          Gets the first child element
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element el, java.lang.String tagName)
          Gets the first child element for a givenname
static org.w3c.dom.Element getParentElement(org.w3c.dom.Element el)
          Gets parent element or null if there is none
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAttributeValue

public static java.lang.String getAttributeValue(org.w3c.dom.Element el,
                                                 java.lang.String attrName)
Get the value from the given attribute

Returns:
null if the attribute value is empty or the attribute is not present

getAttributeValueAsQName

public static QName (src)  getAttributeValueAsQName(org.w3c.dom.Element el,
                                             java.lang.String attrName)
Get the qname value from the given attribute


getAttributeValueAsBoolean

public static boolean getAttributeValueAsBoolean(org.w3c.dom.Element el,
                                                 java.lang.String attrName)
Get the boolean value from the given attribute


getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element el)
Gets the first child element


getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element el,
                                                       java.lang.String tagName)
Gets the first child element for a givenname


getParentElement

public static org.w3c.dom.Element getParentElement(org.w3c.dom.Element el)
Gets parent element or null if there is none