com.sun.xml.ws.util
Class DOMUtil

java.lang.Object
  extended by com.sun.xml.ws.util.DOMUtil

public class DOMUtil
extends Object

$author: JAXWS Development Team


Constructor Summary
DOMUtil()
           
 
Method Summary
static Document createDom()
          Creates a new DOM document.
static Node createDOMNode(InputStream inputStream)
           
static List<Element> getChildElements(Node parent)
           
static Element getFirstChild(Element e, String nsUri, String local)
          Gets the first child of the given name, or null.
static Element getFirstElementChild(Node parent)
          Gets the first element child.
static void serializeNode(Element node, javax.xml.stream.XMLStreamWriter writer)
          Traverses a DOM node and writes out on a streaming writer.
static void writeTagWithAttributes(Element node, javax.xml.stream.XMLStreamWriter writer)
           
 
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

createDom

public static Document createDom()
Creates a new DOM document.


createDOMNode

public static Node createDOMNode(InputStream inputStream)

serializeNode

public static void serializeNode(Element node,
                                 javax.xml.stream.XMLStreamWriter writer)
                          throws javax.xml.stream.XMLStreamException
Traverses a DOM node and writes out on a streaming writer.

Parameters:
node -
writer -
Throws:
javax.xml.stream.XMLStreamException

writeTagWithAttributes

public static void writeTagWithAttributes(Element node,
                                          javax.xml.stream.XMLStreamWriter writer)
                                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

getFirstChild

public static Element getFirstChild(Element e,
                                    String nsUri,
                                    String local)
Gets the first child of the given name, or null.


getFirstElementChild

@Nullable
public static Element getFirstElementChild(Node parent)
Gets the first element child.


getChildElements

@NotNull
public static List<Element> getChildElements(Node parent)