Results 1 to 4 of 4
  1. #1
    vissu007 is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    0

    Default convert html to plain text

    I want the source code in java to convert a html file to a plain text file.Reply soon.Thanq

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    You can use regular expressions (java.util.regex package) if the tags are easy to identify in your documents.

    If html used in a complex way in your documents (e.g. if they might have invalid html like not having some closing tags), then you should use a library to parse the html document. I recommend you to use an html parser. They are easy to use.

    And if you dont want to use an additional library in your project, you can try using Swing HTML Parser.

  3. #3
    vissu007 is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    0

    Default

    I want to convert html file to text by giving it's URL as input.Plz give me the complete source code for it in JAVA if anybody can.Reply soon.Thanq

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    I want to convert html file to text by giving it's URL as input.
    Check this tutorial for downloading web page from an URL.

Similar Threads

  1. Convert .java to .exe
    By susan in forum New To Java
    Replies: 6
    Last Post: 02-11-2009, 07:47 AM
  2. HSSF: Html to Text conversion
    By xtech in forum Advanced Java
    Replies: 1
    Last Post: 04-17-2008, 09:45 AM
  3. convert html to text using java
    By praveen@asia-mail.com in forum New To Java
    Replies: 1
    Last Post: 11-14-2007, 03:08 PM
  4. convert a lot of images into a single one
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 05:47 PM
  5. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •