org.apache.servicemix.soap.util
Class DomUtil

java.lang.Object
  extended by org.apache.servicemix.soap.util.DomUtil

public class DomUtil
extends Object

DOM related utilities.

Author:
Guillaume Nodet

Constructor Summary
DomUtil()
           
 
Method Summary
static Document createDocument()
           
static Element createElement(Node parent, QName name)
           
static QName createQName(Element element, String qualifiedName)
          Creates a QName instance from the given namespace context for the given qualifiedName
static DocumentBuilderFactory getDocumentBuilderFactory()
           
static String getElementText(Element element)
          Returns the text of the element
static Element getFirstChildElement(Node parent)
          Get the first child element
static Element getNextSiblingElement(Element el)
          Get the next sibling element
static QName getQName(Element el)
           
static TransformerFactory getTransformerFactory()
           
protected static String getUniquePrefix(Element element)
           
static Document parse(InputStream is)
           
static Document parse(Source source)
           
static String recursiveGetAttributeValue(Node parent, String attributeName)
          Recursive method to find a given attribute value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomUtil

public DomUtil()
Method Detail

createDocument

public static Document createDocument()

parse

public static Document parse(InputStream is)

parse

public static Document parse(Source source)

getDocumentBuilderFactory

public static DocumentBuilderFactory getDocumentBuilderFactory()

getTransformerFactory

public static TransformerFactory getTransformerFactory()

getFirstChildElement

public static Element getFirstChildElement(Node parent)
Get the first child element

Parameters:
parent -
Returns:

getElementText

public static String getElementText(Element element)
Returns the text of the element


getNextSiblingElement

public static Element getNextSiblingElement(Element el)
Get the next sibling element

Parameters:
el -
Returns:

createElement

public static Element createElement(Node parent,
                                    QName name)

createQName

public static QName createQName(Element element,
                                String qualifiedName)
Creates a QName instance from the given namespace context for the given qualifiedName

Parameters:
element - the element to use as the namespace context
qualifiedName - the fully qualified name
Returns:
the QName which matches the qualifiedName

recursiveGetAttributeValue

public static String recursiveGetAttributeValue(Node parent,
                                                String attributeName)
Recursive method to find a given attribute value


getUniquePrefix

protected static String getUniquePrefix(Element element)

getQName

public static QName getQName(Element el)


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.