Re: [Htmlparser-user] set URL for relative links
Brought to you by:
derrickoswald
From: Garry H. <ga...@gm...> - 2006-09-11 17:07:28
|
Did you try my_parser.setURL("http://www.bar.com/"); ? Just a thought. Cheers, Garry On Sep 12, 2006, at 12:58 AM, jpdogg wrote: > Hello, > > I've cached some HTML pages in local files and would like to tell the > Parser object what the original URLs were so that it can correctly > interpret relative links. > > As a simple example, say I do this: > > Parser my_parser = new Parser("<html><img src='foo.jpg'></html>"); > > If I construct a filter to give me all of the ImageTags in this simple > document, I get one. Unfortunately, it has the URL foo.jpg. If I > know that this file was originally located at > http://www.bar.com/foo.html, how do I inform the parser module? I > want it to be able to report that the above image is located at > http://www.bar.com/foo.jpg. > > Thanks! > Jeff > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user |