public class DOMUtil extends Object
Constructor and Description |
---|
DOMUtil() |
Modifier and Type | Method and Description |
---|---|
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) |
public static Document createDom()
public static Node createDOMNode(InputStream inputStream)
public static void serializeNode(Element node, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
node
- writer
- javax.xml.stream.XMLStreamException
public static void writeTagWithAttributes(Element node, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
public static Element getFirstChild(Element e, String nsUri, String local)
@Nullable public static Element getFirstElementChild(Node parent)
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.