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