In my project I have an HTMLEditor, All pages are stored in database.
Becase of storing pages in database, there are problems with image... I can use image in my html pages....
But I want to do this: Store image in database, and set the value of src of image tag the id of the image which is stored separetly.
And when my Application is will need to show this html pages, find all img tags, load images (using the id which is src value) and store in temporary folder, and replace src value with the full path to temporarly stored image.
CAn I do this with HTMLParser?
And is there someone who can help with this?
I have just idea... I think it will be to hard to write such code for me ))))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The org.htmlparser.parserapplications.SiteCapturer shows how to rewite the URLs in a page, which is what you want to do for your IMG tags. See:
bin/sitecapturer
You will need to selectively rewrite the IMG tags to point to the location of your images.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In my project I have an HTMLEditor, All pages are stored in database.
Becase of storing pages in database, there are problems with image... I can use image in my html pages....
But I want to do this: Store image in database, and set the value of src of image tag the id of the image which is stored separetly.
And when my Application is will need to show this html pages, find all img tags, load images (using the id which is src value) and store in temporary folder, and replace src value with the full path to temporarly stored image.
CAn I do this with HTMLParser?
And is there someone who can help with this?
I have just idea... I think it will be to hard to write such code for me ))))
oh, sorry there mistake
I can use image in my html pages....
must be
I CAN NOT use image in my html pages....
There is a sample that may be of assistance.
The org.htmlparser.parserapplications.SiteCapturer shows how to rewite the URLs in a page, which is what you want to do for your IMG tags. See:
bin/sitecapturer
You will need to selectively rewrite the IMG tags to point to the location of your images.