Forums Register Login

relative to absolute conversion

+Pie Number of slices to send: Send
Hi-ya

I am looking for a library or even just a class that takes in an html doc, converts the relative links to absolute links and gives me back the html.

I can see how it would be done, but surely this must exist somewhere, no? Or do I have to roll my own?

thanks.

kent
+Pie Number of slices to send: Send
Firefox has plugins that yank every link on a page.

If you want to look at the page yourself, there is a link array that contains every link on the page.

Eric
+Pie Number of slices to send: Send
thanks, but I suppose I neglected to mention that I want to do this from a java application.
+Pie Number of slices to send: Send
then I will move this to a Java Forum....
+Pie Number of slices to send: Send
I use the Quiotix HTML Parser which is a good tool to walk through the HTML, look for stuff, change it, and regenerate HTML.

If you use something like that you can find any relative addresses and fix them up. Here's code I use for that in my Wiki ... the "nameSpace" variable is the absolute path to the page that contains the relative links. It doesn't support "." to indicate current directory, but otherwise I'm pretty sure it works

[ April 07, 2005: Message edited by: Stan James ]
+Pie Number of slices to send: Send
thanks!
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 525 times.
Similar Threads
does the browser behaves differently ?
RequestDispatcher
problem displaying htmlData through javaMail
response.sendRedirect help needed
Open an HTML page in IE or Netscape from Java Application
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:34:48.