List of utility methods to do XML Element Check
boolean | isExtension(Element element) is Extension String name = element.getAttribute("name"); return "extension".equals(name); |
boolean | isGateway(Element element) is Gateway String elementLocalName = element.getLocalName();
return (GATEWAY_RECEIVER_ELEMENT_NAME.equals(elementLocalName)
|| GATEWAY_SENDER_ELEMENT_NAME.equals(elementLocalName));
|
boolean | isHTMLElement(Element elem) is HTML Element return elem instanceof HTMLElement; |
boolean | isInfoNode(Element e) is this Node is information node? for (String s : INFO_NODE) { if (e.getTagName().equals(s)) { return true; return false; |
boolean | isLeaf(Element element) is Leaf return getChildren(element).size() == 0;
|
boolean | isLinkNode(Element e) is Link Node if (e.getTagName().equals(LINK_NODE)) { return true; return false; |
boolean | isLocalName(Element element, String name) is Local Name return element.getLocalName().equals(name);
|
boolean | isMuleNamespace(Element element) is Mule Namespace String ns = element.getNamespaceURI();
return ns != null && ns.startsWith(MULE_NAMESPACE_PREFIX);
|
boolean | isNil(Element aElement) Returns true if the element is null or if it has xsi:nil attribute value of "true". if (aElement != null) { return "true".equals(aElement.getAttributeNS(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil")); } else { return true; |
boolean | isNil(Element element) Tests if an element is nil. String nil = element.getAttributeNS(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil"); return "true".equals(nil) || "1".equals(nil); |