|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.maximo.util.Dom
public final class Dom
This class consists exclusively of static methods that operate on or return XML content and DOM elements.
| Constructor Summary | |
|---|---|
Dom()
|
|
| Method Summary | |
|---|---|
static Map<String,String> |
getAttributes(Node rootNode)
Returns a map containing the child nodes found in the given
XML node. |
static Map<String,String> |
getAttributes(Node rootNode,
Set<String> names)
Searches the specified XML node for child nodes with the specified names. |
static String |
getAttributeValue(Node node,
String attributeName)
Returns the value of the specified attribute. |
static NodeList |
getElements(String elementName,
Document document)
Returns all elements specified by elementName. |
static NodeList |
getElements(String elementName,
String xml)
Parses the XML content and returns all elements specified by elementName. |
static String |
getTextValue(Node node)
Returns the text value of the specified XML node. |
static boolean |
isNull(Node node)
Indicates if the specified XML node has null value. |
static Document |
parse(String xml)
Parses the XML content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Dom()
| Method Detail |
|---|
public static Map<String,String> getAttributes(Node rootNode)
map containing the child nodes found in the given
XML node.
rootNode - XML node whose child nodes are to be returned
map containing the child nodes found in the given XML
node
public static Map<String,String> getAttributes(Node rootNode,
Set<String> names)
rootNode - XML node whose child nodes are to be returnednames - names of the attributes to be found
map containing the child nodes found and its
respective values
public static String getAttributeValue(Node node,
String attributeName)
node - node containing the specified attributeattributeName - attribute's name
null if the
attribute does not exist
public static NodeList getElements(String elementName,
Document document)
elementName - name of the element to be returneddocument - DOM document
public static NodeList getElements(String elementName,
String xml)
throws MxConnXmlParsingException
elementName - name of the element to be returnedxml - XML content to be parsed
MxConnXmlParsingException - if it is not possible to parse the XML contentpublic static String getTextValue(Node node)
node - XML node
public static boolean isNull(Node node)
null value. NOTE:
Not used.
node - XML node
true if the specified XML node has null
value, otherwise false
public static Document parse(String xml)
throws MxConnXmlParsingException
xml - XML content to be parsed
MxConnXmlParsingException - if it is not possible to parse the XML content
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||