Same as above but using an attribute map.
480532
public void addDataElement(String elemName, String content, Map<String,String> attrs) {
    	addDataElement(elemName, content, toAttributes(attrs));
    }
303672
public <T> B attr(AttributeKey<T> key, T value) {
        if (key == null) {
            throw new NullPointerException("key");
        }
        if (value == null) {
            synchronized (attrs) {
                attrs.remove(key);
            }
        } else {
            synchronized (attrs) {
                attrs.put(key, value);
            }
        }
        return self();
    }
362886
private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) {
        Iterator iterator = attributes.iterator();
        while (iterator.hasNext()) {
            Attribute key = (Attribute) iterator.next();
           if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
                return false;
            }
        }
        return true;
    }
899773
protected static Attributes buildAttributes(final Map attributes) {
        final AttributesImpl attr = new AttributesImpl();
        for (Object o : attributes.entrySet()) {
            final Map.Entry entry = (Map.Entry) o;
            final String attributeName = (String) entry.getKey();
            final String attributeValue = String.valueOf(entry.getValue());
            attr.addAttribute(null, attributeName, attributeName, "CDATA", attributeValue);
        }
        return attr;
    }
274459
def attributes= (attrs)
      attrs.each_pair do |name, value|
        field = schema.fields[name.to_s] || FieldDefinition.new(name, :type => value.class)
        setter = "#{name}=".to_sym
        if respond_to?(setter)
          send(setter, value)
        else
          write_attribute(field, value, self)
        end
      end
    end
939693
def attributes(name, **kwargs):
    ''''''
    print('%s has attributes:' % name)
    for key, value in kwargs.items():
        print('\t%s => %s' % (key, value))
192836
def attributes(cls):
        

        for k in dir(cls):
            v = getattr(cls, k)
            if isinstance(v, Attribute):
                yield k,v
627633
def attrfindrows(self, groupname, attrname, value):
        """"""
        values = self.attrgetcol(groupname, attrname)
        return [i for i in range(len(values)) if values[i] == value]
307051
def add(self,attrlist,attrvalues):
        '''
        
        '''
        for i,d in enumerate(attrlist):
            self[d] = attrvalues[i]
1272049
private void initializePossibleAttributeNames() {
        final Set<String> possibleAttribNames = new LinkedHashSet<>();

        for (final Map<String, List<Object>> attributeMapForSomeUser : this.backingMap.values()) {
            final Set<String> keySet = attributeMapForSomeUser.keySet();
            possibleAttribNames.addAll(keySet);
        }

        this.possibleUserAttributeNames = Collections.unmodifiableSet(possibleAttribNames);
    }
1341950
private AttributeValue mapColumnValue(String storeName, DColumn col) {
        AttributeValue attrValue = new AttributeValue();
        if (!DBService.isSystemTable(storeName)) {
            if (col.getRawValue().length == 0) {
                attrValue.setS(DynamoDBService.NULL_COLUMN_MARKER);
            } else {
                attrValue.setB(ByteBuffer.wrap(col.getRawValue()));
            }
        } else {
            String strValue = col.getValue();
            if (strValue.length() == 0) {
                strValue = DynamoDBService.NULL_COLUMN_MARKER;
            }
            attrValue.setS(strValue);
        }
        return attrValue;
    }
902278
def _pys2attributes(self, line):
        """"""

        splitline = self._split_tidy(line)

        selection_data = map(ast.literal_eval, splitline[:5])
        selection = Selection(*selection_data)

        tab = int(splitline[5])

        attrs = {}
        for col, ele in enumerate(splitline[6:]):
            if not (col % 2):
                # Odd entries are keys
                key = ast.literal_eval(ele)

            else:
                # Even cols are values
                attrs[key] = ast.literal_eval(ele)

        self.code_array.cell_attributes.append((selection, tab, attrs))
1329707
def apply_attributes(node: Node, **_):
    """"""
    for attr in node.xml_node.attrs:
        apply_attribute(node, attr)
998577
public void renameNodesWithAttributeValue(String oldName, String newName, String attributeName, String attributeValue) {
		List<Node> nodes = getNodesFromTreeByName(oldName);
		Iterator i = nodes.iterator();
		while (i.hasNext()) {
			Node n = (Node) i.next();
			n.setName(newName);
		}
	}
831886
private void encodeAttributes(List attributes, PrintStream out,
                                  Indenter indenter) {
        Iterator it = attributes.iterator();
        while (it.hasNext()) {
            Attribute attr = (Attribute)(it.next());
            attr.encode(out, indenter);
        }
    }
398918
protected Map<String, List<Object>> buildMutableAttributeMap(final Map<String, List<Object>> attributes) {
        final Map<String, List<Object>> mutableValuesBuilder = this.createMutableAttributeMap(attributes.size());

        for (final Map.Entry<String, List<Object>> attrEntry : attributes.entrySet()) {
            final String key = attrEntry.getKey();
            List<Object> value = attrEntry.getValue();

            if (value != null) {
                value = new ArrayList<>(value);
            }

            mutableValuesBuilder.put(key, value);
        }

        return mutableValuesBuilder;
    }
11041
function getAttrMap(attrs)
{
	var i;
	var map = {};
	var numAttrs = attrs.length;
	
	for (i=0; i<numAttrs; i++)
	{
		map[ attrs[i].name ] = attrs[i].value;
	}
	
	return map;
}