List of utility methods to do XML Node to Element
boolean | isElement(final Node n) is Element return n instanceof Element; |
boolean | isElement(Node e) is Element return e.getNodeType() == Node.ELEMENT_NODE;
|
boolean | isElement(Node node) is Element return node.getNodeType() == Node.ELEMENT_NODE;
|
boolean | isElement(Node node) Returns whether the specified node is an element return node.getNodeType() == Node.ELEMENT_NODE;
|
boolean | isElement(Node node) Determines if the given Node is non-null and is an XML Element.
return node != null && node.getNodeType() == Node.ELEMENT_NODE;
|
boolean | isElement(Node node) Determines if the given Node is non-null and is an XML Element.
return (node != null && node.getNodeType() == Node.ELEMENT_NODE);
|
boolean | isElement(Node node) is Element short nodeType = node.getNodeType(); if (Node.ELEMENT_NODE == nodeType || Node.DOCUMENT_NODE == nodeType) { return true; return false; |
boolean | isElement(Node node, String name) is Element return node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals(name);
|
boolean | isElementByTag(Node node, String tagName) is Element By Tag if (!(node instanceof Element)) return false; if (tagName == null) return true; Element element = (Element) node; String tag = element.getTagName(); return tag.equals(tagName) || getLocalName(tag).equals(getLocalName(tagName)); |
boolean | isElementContent(Node node) Checks whether the specified node has element content or consists only of character data. if (node == null) { return false; NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { return true; ... |