|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.util.DOMUtil
public final class DOMUtil
A collection of W3C DOM helper methods
| Method Summary | |
|---|---|
static void |
addChildElement(org.w3c.dom.Element element,
java.lang.String name,
java.lang.Object textValue)
Adds the child element with the given text |
static java.lang.String |
asIndentedXML(org.w3c.dom.Node node)
A helper method useful for debugging and logging which will convert the given DOM node into XML text |
static java.lang.String |
asXML(org.w3c.dom.Node node)
A helper method useful for debugging and logging which will convert the given DOM node into XML text |
static void |
copyAttributes(org.w3c.dom.Element from,
org.w3c.dom.Element to)
Copy the attribues on one element to the other |
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 |
getBuilder()
|
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)
Build a QName from the element name |
static void |
moveContent(org.w3c.dom.Element from,
org.w3c.dom.Element to)
Moves the content of the given element to the given element |
static org.w3c.dom.Document |
newDocument()
Return a new document, ready to populate. |
static java.lang.String |
recursiveGetAttributeValue(org.w3c.dom.Element element,
java.lang.String attributeName)
Recursive method to find a given attribute value |
static void |
releaseBuilder(javax.xml.parsers.DocumentBuilder builder)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getElementText(org.w3c.dom.Element element)
public static void moveContent(org.w3c.dom.Element from,
org.w3c.dom.Element to)
public static void copyAttributes(org.w3c.dom.Element from,
org.w3c.dom.Element to)
public static java.lang.String asXML(org.w3c.dom.Node node)
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public static java.lang.String asIndentedXML(org.w3c.dom.Node node)
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public static void addChildElement(org.w3c.dom.Element element,
java.lang.String name,
java.lang.Object textValue)
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 name
public static java.lang.String recursiveGetAttributeValue(org.w3c.dom.Element element,
java.lang.String attributeName)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node parent)
parent -
public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Element el)
el -
public static javax.xml.namespace.QName getQName(org.w3c.dom.Element el)
el -
public static javax.xml.parsers.DocumentBuilder getBuilder()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationExceptionpublic static void releaseBuilder(javax.xml.parsers.DocumentBuilder builder)
public static org.w3c.dom.Document newDocument()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||