Results 1 to 5 of 5

Thread: [help] How to get only printable string of any webpage

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    Resolved [help] How to get only printable string of any webpage

    Hello everyone
    I want to know how to get the printable texts only of any webpage in Vb6? I am using webbrowser control.
    I am using the following code to get html source
    Code:
    wb1.Document.documentElement.OuterHTML
    this code is working fine but it is showing the complete source code with Html <> tags. I want to get only the texts which webpage displays on browser.. In browser it doesn't shows Html tags..

    I hope you are understanding what i am asking for..

    Another thing is I don't know the tag or element name of the webpage, means that can be any webpage.



    Any help on this topic please?
    Thanks
    Regards,
    Last edited by green.pitch; Apr 10th, 2013 at 06:00 AM. Reason: Topic solved !

  2. #2
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    928

    Re: [help] How to get only printable string of any webpage

    Quote Originally Posted by green.pitch View Post
    Hello everyone
    I want to know how to get the printable texts only of any webpage in Vb6? I am using webbrowser control.
    I am using the following code to get html source
    Code:
    wb1.Document.documentElement.OuterHTML
    this code is working fine but it is showing the complete source code with Html <> tags. I want to get only the texts which webpage displays on browser.. In browser it doesn't shows Html tags..

    I hope you are understanding what i am asking for..

    Another thing is I don't know the tag or element name of the webpage, means that can be any webpage.



    Any help on this topic please?
    Thanks
    Regards,
    Just parse the string < > are the delimiters . Outside that is text , but not all the text . Some tags also can have text as parameter

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    Re: [help] How to get only printable string of any webpage

    Quote Originally Posted by flyguille View Post
    Just parse the string < > are the delimiters . Outside that is text , but not all the text . Some tags also can have text as parameter
    Thanks, but query has been solved by just replacing
    Code:
    wb1.Document.documentElement.OuterHTML
    with
    Code:
    wb1.Document.documentElement.OuterText
    Regards

  4. #4
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    928

    Re: [help] How to get only printable string of any webpage

    Quote Originally Posted by green.pitch View Post
    Thanks, but query has been solved by just replacing
    Code:
    wb1.Document.documentElement.OuterHTML
    with
    Code:
    wb1.Document.documentElement.OuterText
    Regards
    you are using a webbrowsing component from M$?, be warned about HTML5 exists.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2012
    Posts
    106

    Re: [help] How to get only printable string of any webpage

    Hi,
    If you read the topic carefully, you will come to know that I'v already told above that i am using webbrowser control..
    Regards,

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