|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.adfemg.audits.utils.XmlUtils
public class XmlUtils
Constructor Summary | |
---|---|
XmlUtils()
|
Method Summary | |
---|---|
static java.lang.String |
docElementName(org.w3c.dom.Document document)
Returns the name of the document (root) element if it exists, or null
if none can be found. |
static boolean |
doesAttributExist(org.w3c.dom.NamedNodeMap nodeMap,
java.lang.String attributeName)
Checks if a nodeName exist in a NamedNodeMap. |
static boolean |
doesNodeExist(org.w3c.dom.NodeList nodeList,
java.lang.String nodeName)
Checks if a nodeName exist in a NodeList. |
static org.w3c.dom.Node |
findFirstAttributeInList(org.w3c.dom.NamedNodeMap nodeMap,
java.lang.String attributeName)
Looks for a attribute in a NamedNodeMap, returns the first one if any is found. |
static org.w3c.dom.Node |
findFirstNodeInList(org.w3c.dom.NodeList nodeList,
java.lang.String nodeName)
Looks for a node in a NodeList, returns the first one if any is found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlUtils()
Method Detail |
---|
public static boolean doesNodeExist(org.w3c.dom.NodeList nodeList, java.lang.String nodeName)
nodeList
- the NodeList to check.nodeName
- the name to look up.
public static org.w3c.dom.Node findFirstNodeInList(org.w3c.dom.NodeList nodeList, java.lang.String nodeName)
nodeList
- the NodeList to check.nodeName
- the nodeName to look up.
public static org.w3c.dom.Node findFirstAttributeInList(org.w3c.dom.NamedNodeMap nodeMap, java.lang.String attributeName)
nodeMap
- attributeName
-
public static boolean doesAttributExist(org.w3c.dom.NamedNodeMap nodeMap, java.lang.String attributeName)
nodeMap
- attributeName
-
public static java.lang.String docElementName(org.w3c.dom.Document document)
null
if none can be found. This can be used to prevent NullPointerExceptions when
requesting document.getDocumentElement().getNodeName() directly.
document
- XML document
null
if input document
is null
or the document does not have a document element (eg empty doc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |