Here you can find the source of removeAttribute(Node node, String... attributs)
public static boolean removeAttribute(Node node, String... attributs)
//package com.java2s; //License from project: BSD License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static boolean removeAttribute(Node node, String... attributs) { 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;//from ww w . jav a 2 s .com } } return ret; } }