/** * Clear (remove) all of the attributes in this node. * @return this, for chaining */ public Node clearAttributes() { Iterator<Attribute> it = attributes().iterator(); while (it.hasNext()) { it.next(); it.remove(); } return this; }
public void copyAttributes(Element src) { Attributes attrs = src.attributes(); Iterator<Attribute> it = attrs.iterator(); Attribute attr; while (it.hasNext()) { attr = it.next(); this.attr(attr.getKey(), attr.getValue()); } } }
Iterator<Attribute> attrs = elem.attributes().iterator(); Attribute attr; while (attrs.hasNext()) {