List of utility methods to do XML Attribute Remove
void | removeAttribute(Node iNode, String iAttributeName) This method removes the specified attribute from the specified node NamedNodeMap attrList = iNode.getAttributes(); attrList.removeNamedItem(iAttributeName); |
void | removeAttribute(Node iNode, String iAttributeName) This method removes the specified attribute from the specified node NamedNodeMap attrList = iNode.getAttributes(); attrList.removeNamedItem(iAttributeName); |
void | removeAttribute(Node node, String attName) remove Attribute NamedNodeMap attributes = node.getAttributes(); attributes.removeNamedItem(attName); |
void | removeAttribute(Node node, String attr) Removes a named attribute of a Node
if (node == null) throw new IllegalArgumentException("Node argument cannot be null"); if (attr == null) throw new IllegalArgumentException("Node attribute argument cannot be null"); NamedNodeMap map = node.getAttributes(); if (map != null) { Node an = map.getNamedItem(attr); if (an != null) ... |
void | removeAttribute(Node node, String attrName) remove Attribute final NamedNodeMap attrNode = node.getAttributes(); if (attrNode == null) { return; attrNode.removeNamedItem(attrName); |
boolean | removeAttribute(Node node, String... attributs) remove Attribute NamedNodeMap att = node.getAttributes(); if (att == null) return false; boolean ret = false; for (String attribut : attributs) { if (att.getNamedItem(attribut) != null) { att.removeNamedItem(attribut); ret = true; ... |
void | removeAttribute(Node parent, String name, String value, boolean recursive) remove Attribute NamedNodeMap nnm = parent.getAttributes(); if (nnm != null) if (value == null) nnm.removeNamedItem(name); else { Node attr = nnm.getNamedItem(name); if (attr != null) { String attrVal = attr.getNodeValue(); ... |
void | removeAttributeIgnoreCase(Element element, String attributeName) Removes the DOM attribute from element with the given name.
Attr a = getAttributeIgnoreCase(element, attributeName);
if (a != null) {
element.removeAttributeNode(a);
|
void | removeAttributes(Element e, String namespaceURI) Remove all attributes with a certain namespace from this element. NamedNodeMap attributes = e.getAttributes(); ArrayList list = new ArrayList(); for (int i = 0; i < attributes.getLength(); i++) { Attr a = (Attr) attributes.item(i); if (namespaceURI.equals(a.getNamespaceURI())) { list.add(a); Iterator i = list.iterator(); while (i.hasNext()) { e.removeAttributeNode((Attr) i.next()); |
void | removeAttributes(Element elem) remove Attributes if (elem.hasAttributes()) { NamedNodeMap attributeMap = elem.getAttributes(); int n = attributeMap.getLength(); Attr[] attributes = new Attr[n]; for (int i = 0; i < n; i++) attributes[i] = (Attr) attributeMap.item(i); for (int i = 0; i < n; i++) elem.removeAttributeNode(attributes[i]); ... |