/** * Creates an element by cloning another one. * <p> * Cloning is shallow.<br> * For deep cloning, use {@link #clone(boolean)}. * * @param other The element to clone. */ public Element(Element other) { this(null, other.getName()); for (int index = 0; index < other.getAttributesCount(); index++) { addAttribute(new Attribute(other.getAttributeAt(index))); } }
if (predicate.test(element) && element.getAttributesCount() > 1 && !element.getAttributeAt(0).getName().equals(name)) { final Attribute attribute = element.removeAttribute(name); if (attribute != null) {