Here you can find the source of stripAttribute(Element body, String attribute)
private static void stripAttribute(Element body, String attribute)
//package com.java2s; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; public class Main { private static void stripAttribute(Element body, String attribute) { Elements elements = body.getElementsByAttribute(attribute); for (Element e : elements) { e.removeAttr(attribute);//from ww w . j a v a2 s .co m } } }