Results 1 to 9 of 9

Thread: How do I filter off HTML tags?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93

    How do I filter off HTML tags?

    Hi ppl!
    I'm really new to this program and I need your assistance for this project of mine.
    As mention above, how do I filter off html tags from a text file which is taken down from a website?

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Can you explain just a little more. Do you want the text from the page? Do you want to find certain elements of the page?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93
    Oh sorry, as I'm very newbie in here.
    I have written a program just to extract the Source code of any website and written it down and a txt file. As it is written is Java, I need to filter off those tags in order for me to retrive information inside this text file.. I'm not sure whether I have explained well enuff but please do ask about your doubts to my question.
    Thanks a million..

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You can open the file in notepad.

    If you need to strip of all tags then you are going to want to read up on the string class and it's methods. Specifically look at the IndexOf method and the SubString method.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93
    Thank you for your guidance..

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93
    i have read up those topics but still can't undertsnad due to my stupidlity.. Is there any more other simpler ways to filter it off?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93
    Maybe you experts can teach me how do I search from a text file like search from " < " to " > " and I can delete that entire whole thing.. Maybe like that will helps me to filter it off the html tags?

  8. #8
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    like it's been refered before..use the indexof() and substring() functions..search over msdn to look for that if u dont know how to use them...or CTRL + F1 in IDE to know about that...and we are not experts..we just use the brain

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Singapore
    Posts
    93
    Thank youonce again..

Posting Permissions

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



Click Here to Expand Forum to Full Width