|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.wsf.common.DOMUtils
public final class DOMUtils
DOM2 utilites
Method Summary | |
---|---|
static void |
clearThreadLocals()
|
static void |
copyAttributes(org.w3c.dom.Element destElement,
org.w3c.dom.Element srcElement)
Copy attributes between elements |
static org.w3c.dom.Element |
createElement(javax.xml.namespace.QName qname)
Create an Element for a given QName |
static org.w3c.dom.Element |
createElement(java.lang.String localPart)
Create an Element for a given name |
static org.w3c.dom.Element |
createElement(java.lang.String localPart,
java.lang.String prefix)
Create an Element for a given name and prefix |
static org.w3c.dom.Element |
createElement(java.lang.String localPart,
java.lang.String prefix,
java.lang.String uri)
Create an Element for a given name, prefix and uri |
static org.w3c.dom.Text |
createTextNode(java.lang.String value)
Create a org.w3c.dom.Text node |
static java.util.Map |
getAttributes(org.w3c.dom.Element el)
Get the attributes as Map |
static java.lang.String |
getAttributeValue(org.w3c.dom.Element el,
javax.xml.namespace.QName attrName)
Get the value from the given attribute |
static java.lang.String |
getAttributeValue(org.w3c.dom.Element el,
java.lang.String attrName)
Get the value from the given attribute |
static boolean |
getAttributeValueAsBoolean(org.w3c.dom.Element el,
javax.xml.namespace.QName attrName)
Get the boolean value from the given attribute |
static boolean |
getAttributeValueAsBoolean(org.w3c.dom.Element el,
java.lang.String attrName)
Get the boolean value from the given attribute |
static java.lang.Integer |
getAttributeValueAsInteger(org.w3c.dom.Element el,
javax.xml.namespace.QName attrName)
Get the integer value from the given attribute |
static java.lang.Integer |
getAttributeValueAsInteger(org.w3c.dom.Element el,
java.lang.String attrName)
Get the integer value from the given attribute |
static javax.xml.namespace.QName |
getAttributeValueAsQName(org.w3c.dom.Element el,
javax.xml.namespace.QName attrName)
Get the qname value from the given attribute |
static javax.xml.namespace.QName |
getAttributeValueAsQName(org.w3c.dom.Element el,
java.lang.String attrName)
Get the qname value from the given attribute |
static java.util.Iterator<org.w3c.dom.Element> |
getChildElements(org.w3c.dom.Node node)
Gets child elements |
static java.util.Iterator |
getChildElements(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName)
Gets the child element for a given qname |
static java.util.Iterator |
getChildElements(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName,
boolean recursive)
Gets the child element for a given qname |
static java.util.Iterator |
getChildElements(org.w3c.dom.Node node,
java.lang.String nodeName)
Gets the child elements for a given local name without namespace |
static java.util.Iterator |
getChildElements(org.w3c.dom.Node node,
java.lang.String nodeName,
boolean recursive)
Gets the child elements for a given local name without namespace |
static java.util.List<org.w3c.dom.Element> |
getChildElementsAsList(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName)
|
static java.util.List<org.w3c.dom.Element> |
getChildElementsAsList(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName,
boolean recursive)
|
static java.util.List<org.w3c.dom.Element> |
getChildElementsAsList(org.w3c.dom.Node node,
java.lang.String nodeName)
|
static java.util.List<org.w3c.dom.Element> |
getChildElementsAsList(org.w3c.dom.Node node,
java.lang.String nodeName,
boolean recursive)
|
static javax.xml.parsers.DocumentBuilder |
getDocumentBuilder()
Initialize the DocumentBuilder |
static javax.xml.namespace.QName |
getElementQName(org.w3c.dom.Element el)
Get the qname of the given node. |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node)
Gets the first child element |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node,
boolean recursive)
Gets the first child element |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName)
Gets the first child element for a given qname |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node,
javax.xml.namespace.QName nodeName,
boolean recursive)
Gets the first child element for a given qname |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node,
java.lang.String nodeName)
Gets the first child element for a given local name without namespace |
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node,
java.lang.String nodeName,
boolean recursive)
Gets the first child element for a given local name without namespace |
static org.w3c.dom.Document |
getOwnerDocument()
Get the owner document that is associated with the current thread |
static org.w3c.dom.Element |
getParentElement(org.w3c.dom.Node node)
Gets parent element or null if there is none |
static java.lang.String |
getTextContent(org.w3c.dom.Node node)
Get the concatenated text content, or null. |
static boolean |
hasChildElements(org.w3c.dom.Node node)
True if the node has child elements |
static boolean |
hasTextChildNodesOnly(org.w3c.dom.Node node)
True if the node has text child elements only |
static org.w3c.dom.Element |
parse(org.xml.sax.InputSource source)
Parse the given input source and return the root Element |
static org.w3c.dom.Element |
parse(java.io.InputStream xmlStream)
Parse the given XML stream and return the root Element |
static org.w3c.dom.Element |
parse(java.lang.String xmlString)
Parse the given XML string and return the root Element |
static org.w3c.dom.Document |
peekOwnerDocument()
Peek at the owner document without creating a new one if not set. |
static javax.xml.namespace.QName |
resolveQName(org.w3c.dom.Element el,
java.lang.String qualifiedName)
Transform the given qualified name into a QName |
static void |
setOwnerDocument(org.w3c.dom.Document doc)
|
static org.w3c.dom.Element |
sourceToElement(javax.xml.transform.Source source)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void clearThreadLocals()
public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
public static org.w3c.dom.Element parse(java.lang.String xmlString) throws java.io.IOException
java.io.IOException
public static org.w3c.dom.Element parse(java.io.InputStream xmlStream) throws java.io.IOException
java.io.IOException
public static org.w3c.dom.Element parse(org.xml.sax.InputSource source) throws java.io.IOException
java.io.IOException
public static org.w3c.dom.Element createElement(java.lang.String localPart)
public static org.w3c.dom.Element createElement(java.lang.String localPart, java.lang.String prefix)
public static org.w3c.dom.Element createElement(java.lang.String localPart, java.lang.String prefix, java.lang.String uri)
public static org.w3c.dom.Element createElement(javax.xml.namespace.QName qname)
public static org.w3c.dom.Text createTextNode(java.lang.String value)
public static javax.xml.namespace.QName getElementQName(org.w3c.dom.Element el)
public static javax.xml.namespace.QName resolveQName(org.w3c.dom.Element el, java.lang.String qualifiedName)
public static java.lang.String getAttributeValue(org.w3c.dom.Element el, java.lang.String attrName)
public static java.lang.String getAttributeValue(org.w3c.dom.Element el, javax.xml.namespace.QName attrName)
public static javax.xml.namespace.QName getAttributeValueAsQName(org.w3c.dom.Element el, java.lang.String attrName)
public static javax.xml.namespace.QName getAttributeValueAsQName(org.w3c.dom.Element el, javax.xml.namespace.QName attrName)
public static boolean getAttributeValueAsBoolean(org.w3c.dom.Element el, java.lang.String attrName)
public static boolean getAttributeValueAsBoolean(org.w3c.dom.Element el, javax.xml.namespace.QName attrName)
public static java.lang.Integer getAttributeValueAsInteger(org.w3c.dom.Element el, java.lang.String attrName)
public static java.lang.Integer getAttributeValueAsInteger(org.w3c.dom.Element el, javax.xml.namespace.QName attrName)
public static java.util.Map getAttributes(org.w3c.dom.Element el)
public static void copyAttributes(org.w3c.dom.Element destElement, org.w3c.dom.Element srcElement)
public static boolean hasTextChildNodesOnly(org.w3c.dom.Node node)
public static boolean hasChildElements(org.w3c.dom.Node node)
public static java.util.Iterator<org.w3c.dom.Element> getChildElements(org.w3c.dom.Node node)
public static java.lang.String getTextContent(org.w3c.dom.Node node)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node, boolean recursive)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node, java.lang.String nodeName)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node, java.lang.String nodeName, boolean recursive)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName)
public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName, boolean recursive)
public static java.util.Iterator getChildElements(org.w3c.dom.Node node, java.lang.String nodeName)
public static java.util.Iterator getChildElements(org.w3c.dom.Node node, java.lang.String nodeName, boolean recursive)
public static java.util.Iterator getChildElements(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName)
public static java.util.Iterator getChildElements(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName, boolean recursive)
public static java.util.List<org.w3c.dom.Element> getChildElementsAsList(org.w3c.dom.Node node, java.lang.String nodeName)
public static java.util.List<org.w3c.dom.Element> getChildElementsAsList(org.w3c.dom.Node node, java.lang.String nodeName, boolean recursive)
public static java.util.List<org.w3c.dom.Element> getChildElementsAsList(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName)
public static java.util.List<org.w3c.dom.Element> getChildElementsAsList(org.w3c.dom.Node node, javax.xml.namespace.QName nodeName, boolean recursive)
public static org.w3c.dom.Element getParentElement(org.w3c.dom.Node node)
public static org.w3c.dom.Document peekOwnerDocument()
public static void setOwnerDocument(org.w3c.dom.Document doc)
public static org.w3c.dom.Document getOwnerDocument()
public static org.w3c.dom.Element sourceToElement(javax.xml.transform.Source source) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |