Here you can find the source of getAttributeList(NamedNodeMap attributeMap)
Parameter | Description |
---|---|
attributeMap | maps names to nodes |
public static String getAttributeList(NamedNodeMap attributeMap)
//package com.java2s; /** Copyright by Barry G. Becker, 2000-2011. Licensed under MIT License: http://www.opensource.org/licenses/MIT */ import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { /**// w w w . j av a 2s . c om * a concatenated list of the node's attributes. * @param attributeMap maps names to nodes * @return list of attributes */ public static String getAttributeList(NamedNodeMap attributeMap) { String attribs = ""; if (attributeMap != null) { attributeMap.getLength(); for (int i = 0; i < attributeMap.getLength(); i++) { Node n = attributeMap.item(i); attribs += n.getNodeName() + "=\"" + n.getNodeValue() + "\" "; } } return attribs; } }