List of utility methods to do XML Node Namespace
boolean | match(final Node node, final String namespace, final String localname) match if (node instanceof Element) { Element element = (Element) node; if (element.getLocalName().equals(localname)) { if (namespace == null || namespace.equals(element.getNamespaceURI())) { return true; return false; |
boolean | matches(final Node node, final boolean useNamespaces, final String namespaceURI, final String localName) Tests whether the given Node matches the specified name. if (useNamespaces) { if (namespaceURI == null && node.getNamespaceURI() != null) { return false; if (namespaceURI != null && !namespaceURI.equals("*") && !namespaceURI.equals(node.getNamespaceURI())) return false; if (localName == null || localName.equals("*")) return true; if (useNamespaces) { return localName.equals(node.getLocalName()); return localName.equals(node.getNodeName()); |
boolean | matches(Node n, String namespace, String tagName) Compare a DOM nod3 by name String nodeName = n.getNodeName().substring(n.getNodeName().indexOf(":") + 1, n.getNodeName().length()); int index = n.getNodeName().indexOf(":"); String nodeNSURI = null; if (index > 0) { nodeNSURI = n.getNodeName().substring(0, n.getNodeName().indexOf(":")); if (nodeNSURI == null) { return objNullEq(tagName.toUpperCase(), nodeName.toUpperCase()); ... |
void | parseStaticInterface(String interfaceName, Node module, String nameSpace, PrintWriter out) Parse an interface as 'static' interface String outline = ""; Node child = null; ArrayList<Node> consts = getNodes(module, interfaceName, "Const"); for (Node n : consts) { writeDescription(out, n, " "); String value = getAttributeValue(n, "value"); if (value == null && getAttributeValue(n, "stringvalue") != null) value = "\"" + getAttributeValue(n, "stringvalue") + "\""; ... |
Node | removeNamedItemNS(final NamedNodeMap nodeMap, final String namespaceURI, final String localName) remove Named Item NS return nodeMap == null ? null : nodeMap.removeNamedItemNS(namespaceURI, localName);
|