extracting only text.

extracting only text using vb2005

Page 1 of 1

4 Replies - 897 Views - Last Post: 29 October 2010 - 11:11 PM Rate Topic: -----

#1 Guest_Revolution_in_coding*


Reputation:

extracting only text.

Posted 29 October 2010 - 10:20 AM

hi,
i am new to vb. i want to make a program that can extract only text from html code.
so far i have done this:
dim br as new browser
     br.Navigate(url.Text)
        While Not br.ReadyState = WebBrowserReadyState.Complete
            Application.DoEvents()
        End While
        sorce.Text = br.DocumentText


someone, anyone please help me. this code generate whole html source code including text and everything. iwant only text shown in webpage. please guide me.

Edited by macosxnerd101: Please, :code:.

Is This A Good Question/Topic? 0

Replies To: extracting only text.

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1591
  • View blog
  • Posts: 3,013
  • Joined: 13-January 08

Re: extracting only text.

Posted 29 October 2010 - 10:26 AM

Attached Image

Posted Image


>sigh!< Welcome to DIC...I guess.
Was This Post Helpful? 2
  • +
  • -

#3 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 173
  • View blog
  • Posts: 1,094
  • Joined: 10-December 08

Re: extracting only text.

Posted 29 October 2010 - 01:42 PM

Well you could get the value attribute of every item on your webpage. You also might want to look into the InnerText property.
Craig328 nice one :P
Was This Post Helpful? 0
  • +
  • -

#4 xnn  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 225
  • Joined: 10-February 10

Re: extracting only text.

Posted 29 October 2010 - 03:47 PM

This can be done easily with Regex. Although you are new to VB, you should be able to find full examples if you search for this topic and regex in google.
Was This Post Helpful? 0
  • +
  • -

#5 Guest_Cybercoder*


Reputation:

Re: extracting only text.

Posted 29 October 2010 - 11:11 PM

View PostJack Eagles1, on 29 October 2010 - 12:42 PM, said:

Well you could get the value attribute of every item on your webpage. You also might want to look into the InnerText property.
Craig328 nice one :P

yes i want inner text only. i mean between
<p>abc</p>
i want abc only no <p>.
please guide me.
Was This Post Helpful? 0

Page 1 of 1