Re: [Htmlparser-user] editing tags
Brought to you by:
derrickoswald
|
From: Derrick O. <der...@ro...> - 2008-03-19 22:26:24
|
If you have the tag, it's just
tag.setImageURL (String url);
The trick is to get the output again.
You probably want a list of everything, then filter to extract your particular IMG tag, fix it, and then call toHtml() on everything.
NodeList list = parser.parse(null);
NodeList images = list.extractAllNodesThatMatch(<my special filter>);
images.elementAt(0).setImageURL ("whatever");
System.out.println (list.toHtml ());
----- Original Message ----
From: Narindra Jeethan <Nar...@te...>
To: htmlparser user list <htm...@li...>
Sent: Wednesday, March 19, 2008 10:57:45 AM
Subject: [Htmlparser-user] editing tags
Hi,
How do I edit the
src attribute in img tag within an html file?
Thanks,
Narindra
-----Inline Attachment Follows-----
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----Inline Attachment Follows-----
_______________________________________________
Htmlparser-user mailing list
Htm...@li...
https://lists.sourceforge.net/lists/listinfo/htmlparser-user
|