Set attributes of tags of HTML using JSoup

epigobget

New Member
How to set attributes of tags of HTML using JSoup?I want to set the attribute->"src" of tag->"img" in Java using Jsoup Library.\[code\]Elements img_attributes = doc.select("img[src^=/im]");for(Element img_attribute: img_attributes){String s = img_attribute.attr("src");System.out.println(s);}\[/code\]This code prints the \[code\]src\[/code\] values.I want to change the \[code\]src\[/code\] values.
 
Back
Top