public class DomUtil
extends java.lang.Object
| Constructor and Description |
|---|
DomUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.w3c.dom.Document |
createDocument() |
static org.w3c.dom.Element |
createElement(org.w3c.dom.Node parent,
javax.xml.namespace.QName name) |
static javax.xml.namespace.QName |
createQName(org.w3c.dom.Element element,
java.lang.String qualifiedName)
Creates a QName instance from the given namespace context for the given qualifiedName
|
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder()
Returns a cached DocumentBuilder instance - should only be used for methods that are considered thread-safe
(e.g.
|
static javax.xml.parsers.DocumentBuilderFactory |
getDocumentBuilderFactory() |
static java.lang.String |
getElementText(org.w3c.dom.Element element)
Returns the text of the element
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node parent)
Get the first child element
|
static org.w3c.dom.Element |
getNextSiblingElement(org.w3c.dom.Element el)
Get the next sibling element
|
static javax.xml.namespace.QName |
getQName(org.w3c.dom.Element el) |
static javax.xml.transform.TransformerFactory |
getTransformerFactory() |
protected static java.lang.String |
getUniquePrefix(org.w3c.dom.Element element) |
static org.w3c.dom.Document |
parse(java.io.InputStream is) |
static org.w3c.dom.Document |
parse(javax.xml.transform.Source source) |
static java.lang.String |
recursiveGetAttributeValue(org.w3c.dom.Node parent,
java.lang.String attributeName)
Recursive method to find a given attribute value
|
public static org.w3c.dom.Document createDocument()
public static org.w3c.dom.Document parse(java.io.InputStream is)
public static org.w3c.dom.Document parse(javax.xml.transform.Source source)
public static javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
throws javax.xml.parsers.ParserConfigurationException
DocumentBuilder.newDocument())javax.xml.parsers.ParserConfigurationExceptionpublic static javax.xml.transform.TransformerFactory getTransformerFactory()
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent)
parent - public static java.lang.String getElementText(org.w3c.dom.Element element)
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element el)
el - public static org.w3c.dom.Element createElement(org.w3c.dom.Node parent,
javax.xml.namespace.QName name)
public static javax.xml.namespace.QName createQName(org.w3c.dom.Element element,
java.lang.String qualifiedName)
element - the element to use as the namespace contextqualifiedName - the fully qualified namepublic static java.lang.String recursiveGetAttributeValue(org.w3c.dom.Node parent,
java.lang.String attributeName)
protected static java.lang.String getUniquePrefix(org.w3c.dom.Element element)
public static javax.xml.namespace.QName getQName(org.w3c.dom.Element el)
Copyright © 2005-2014 FuseSource. All Rights Reserved.