Method Summary |
|
public static String | convertDocumentToString(Document pDocument) Simple utility used to get XML string from XML Document without transformer. |
public static String | convertElementToString(Element pElement) Simple utility used to get XML string from XML Element without transformer. |
public static Map | convertElementToTree(Element pElement) Converts contents of the supplied DOM Element tree (identified by the top Element)
to the tree made of Map elements. |
public static String | getAbsoluteNodePath(Node pNode) absolute path to the node in xpath - like notation. |
public static NodeList | getChildElementsByTagName(Element pParentElement, String pTagName) Returns only direct child elements with the specified TagName
NodeList with found children. |
public static Element | getFirstChildElement(Node pParentNode) Retrieves the first child element of the given node, skips all
nodes with type other than org.w3c.dom.Node.ELEMENT_NODE in the process.
the first child node, which is an Element or null if no child Element found. |
public static Element | getLastChildElement(Node pParentNode) Retrieves the last child element of the given node, skips all
nodes with type other than org.w3c.dom.Node.ELEMENT_NODE in the process.
the last child node, which is an Element or null if no child Element found. |
public static Element | getNextSiblingElement(Node pStartNode) Retrieves next sibling element of the given node, skips all
nodes with type other than org.w3c.dom.Node.ELEMENT_NODE in the process.
next sibling element to the given node or null if no sibling found. |
public static String | getNoteTypeName(short pNodeType) This utility returns a human readable name of the org.w3c.dom.Node type
throws: IllegalArgumentException - in case if invalid value (i.e. |
public static Element | getPrevSiblingElement(Node pStartNode) Retrieves previous sibling element of the given node, skips all
nodes with type other than org.w3c.dom.Node.ELEMENT_NODE in the process.
previous sibling element to the given node or null if no sibling found. |
public static void | removeAllChildNodes(Node pParentNode) Removes all child elements found under the given node. |