HashMap<String, String> m = new HashMap<>(); NamedNodeMap nnm = e.getAttributes(); for (int i = 0; i < nnm.getLength(); i++) { m.put(nnm.item(i).getNodeName(), nnm.item(i).getNodeValue()); return m;
Map<String, String> attributes = new TreeMap<String, String>(); NodeList nodeList = elem.getElementsByTagName(name); int length = nodeList.getLength(); for (int n = 0; n < length; ++n) { attributes.put(((Element) nodeList.item(n)).getAttribute("name"), ((Element) nodeList.item(n)).getAttribute("value")); return attributes; ...
final NamedNodeMap nodeMap = element.getAttributes(); final ArrayList<Attr> result = new ArrayList<Attr>(); for (int i = 0; i < nodeMap.getLength(); i++) result.add((Attr) nodeMap.item(i)); return result;
HashMap<String, String> attributes = new HashMap<String, String>(); NamedNodeMap attr = node.getAttributes(); for (int j = 0; j < attr.getLength(); j++) { attributes.put(attr.item(j).getNodeName(), attr.item(j).getNodeValue()); return attributes;
HashMap<String, String> attrs = new HashMap<String, String>(); NamedNodeMap nmm = node.getAttributes(); for (int j = 0; j < nmm.getLength(); j++) { Node attribute = nmm.item(j); if (attribute.getNodeType() != Node.ATTRIBUTE_NODE) { continue; attrs.put(attribute.getNodeName(), attribute.getNodeValue()); ...
if (aSrcNode != null) { final NamedNodeMap aNNM = aSrcNode.getAttributes(); if (aNNM != null) { final Map<String, String> aMap = new LinkedHashMap<String, String>(aNNM.getLength()); final int nMax = aNNM.getLength(); for (int i = 0; i < nMax; ++i) { final Attr aAttr = (Attr) aNNM.item(i); aMap.put(aAttr.getName(), aAttr.getValue()); ...
for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling()) { if (child.getNodeType() == Node.ELEMENT_NODE) { getAllAttrValueByName(child, name); List<String> tmp = getAllAttrValueByName(child, name); if (tmp != null) { lst.addAll(tmp); } else { getAllAttrs((Element) child, name, lst); ...
List<String> lst = null; NamedNodeMap attributes = item.getAttributes(); int numAttrs = attributes.getLength(); for (int i = 0; i < numAttrs; i++) { Attr attr = (Attr) attributes.item(i); String attrName = attr.getNodeName(); if (name.equals(attrName)) { if (lst == null) { ...
return getElementAttributes(element, new ArrayList<String>());
List<Element> list = new LinkedList<Element>(); if (elementHasId(element, namespace)) { list.add(element); NodeList children = element.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element == false) { ...