Java Utililty Methods XML Attribute to Map

List of utility methods to do XML Attribute to Map

Description

The list of methods to do XML Attribute to Map are organized into topic(s).

Method

MaptoMap(NamedNodeMap attrs)
to Map
return toMapExcept(attrs);
MaptoMapExcept(NamedNodeMap attrs, String... exclusions)
to Map Except
Map<String, String> args = new HashMap<String, String>();
outer: for (int j = 0; j < attrs.getLength(); j++) {
    Node attr = attrs.item(j);
    String attrName = attr.getNodeName();
    for (String ex : exclusions)
        if (ex.equals(attrName))
            continue outer;
    String val = attr.getNodeValue();
...