public class DOMUtil extends Object
Constructor and Description |
---|
DOMUtil() |
Modifier and Type | Method and Description |
---|---|
static Document |
createDom()
Creates a new DOM document.
|
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,
XMLStreamWriter writer)
Traverses a DOM node and writes out on a streaming writer.
|
static void |
writeTagWithAttributes(Element node,
XMLStreamWriter writer) |
public static Document createDom()
public static void serializeNode(Element node, XMLStreamWriter writer) throws XMLStreamException
node
- writer
- XMLStreamException
public static void writeTagWithAttributes(Element node, XMLStreamWriter writer) throws XMLStreamException
XMLStreamException
public static Element getFirstChild(Element e, String nsUri, String local)
@Nullable public static Element getFirstElementChild(Node parent)
Copyright © 2015 Oracle Corporation. All rights reserved.