List of utility methods to do XML Node Local Name
Element | getElementByTagNameNS(Node node, String namespaceURI, String localName) get Element By Tag Name NS NodeList nl; if (node.getNodeType() == Node.DOCUMENT_NODE) { nl = ((Document) node).getElementsByTagNameNS(namespaceURI, localName); } else if (node.getNodeType() == Node.ELEMENT_NODE) { nl = ((Element) node).getElementsByTagNameNS(namespaceURI, localName); } else { return null; if (nl.getLength() > 0) { return (Element) nl.item(0); } else { return null; |
String | getLocalName(final Node n) Retrieves the local name of the given Node if (n == null) { return null; final String name = n.getLocalName(); return name == null ? getLocalName(n.getNodeName()) : name; |
String | getLocalName(final Node node) get Local Name final String result = node.getLocalName(); return result != null ? result : node.getNodeName(); |
String | getLocalName(Node el) get the name of an XML element, with the namespace prefix stripped off String locName = ""; StringTokenizer st = new StringTokenizer(el.getNodeName(), ":"); while (st.hasMoreTokens()) locName = st.nextToken(); return locName; |
String | getLocalName(Node element) Get the non qualified tag name String localName = element.getLocalName(); if (localName != null) { return localName; String name = element.getNodeName(); int idx = name.indexOf(":"); if (idx >= 0) { name = name.substring(idx + 1); ... |
String | getLocalName(Node node) returns local name of this element if not null, otherwise returns the name of the node String name = node.getLocalName();
return (name != null) ? name : node.getNodeName();
|
String | getLocalName(Node node) get Local Name String name = node.getLocalName();
return name != null ? name : node.getNodeName();
|
String | getLocalName(Node node) get Local Name if (node.getPrefix() == null) return node.getNodeName(); else return node.getLocalName(); |
String | getLocalName(Node node) get Local Name String localName = node.getLocalName(); if (localName == null) { localName = node.getNodeName(); int i = localName.indexOf(':'); if (i != -1) { localName = localName.substring(i + 1); return localName; |
String | getNodeLocalName(Node node) get Node Local Name String result = node.getLocalName(); if (result == null) result = node.getNodeName(); return result; |