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