Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am taking a different approach here and I am not sure I can do this

 

SInce I cant seem to figure out how to parse this web page

 

http://www.cityoftulsa.org/divisions/divisions.aspx?div=udsw

and strip the info I need from it I am looking for an alternative and thats just giving in and just display it in a webbrowser control

 

However, I dont wish to just display the whole page

 

If you would look at the page you will see a table appear with info ....

 

I want to just show the table not all the white around the table does that make sense?

 

Ok I'm not finished ..... please note that this page already refreshes itself every 60 seconds ...

 

big woo right ... well the table can grow ... in other words sometimes there may be 3 calls listed while other times 10 or more listed

 

so I know that my container or web browser control will need to be able to expand at the bottom

 

NOw as far as code I know how to navigate the we browser to the page just not sure how to only display the table and then how to also make it expand as the table expands

 

Any thoughts .... appreciated

 

 

vbMarkO

Visual Basic 2008 Express Edition!
Posted

So, you have no access to the data source?

 

You want to resize a webbrowser control to perfectly fit the table?

 

It's fragile, and I would not recommend to do it that way.

 

I'd keep trying to parse the data. Here's a trick I used with my RSS reader. Take the table tag and it's children and load it as a string into an XmlDocument object.

 

Walk the inner table tag and it's children and rip the data from the td tags. You have to keep a counter to keep track of which td tag belongs to what property.

 

It's still fragile, but you can display and manipulate it anyway you want, and you could use a configuration file to keep track of which fields are associated with what property names. And if you want to keep it real flexible, instead of creating a class for storing the data, just use a dictionary.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...