Menu

Can HTMLParser do this?

Help
kazakbala
2005-11-08
2013-04-27
  • kazakbala

    kazakbala - 2005-11-08

    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 ))))

     
    • kazakbala

      kazakbala - 2005-11-08

      oh, sorry there mistake
      I can use image in my html pages....
      must be
      I CAN NOT use image in my html pages....

       
    • Derrick Oswald

      Derrick Oswald - 2005-11-08

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.