0

How would I get text from HTML on a website?

This is all I know to get to it but its only the elements;

webBrowserMain.Document.GetElementById("footer").Children

GetElementsByTagName("ptz-footer")

GetElementsByName("ptz_value")

The ptz_value has the text I want to retrieve.

Thanks...

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by GAME
0

The GetElementsByName("ptz_value") return a NodeList object (collection of nodes). Traverse that collection and I'm sure you will get "Text".

0

Can you show an example? Iv'e been playing around with trying to get the text for some time now.

This is all I got.

this.Text = webBrowserMain.Document.GetElementById("ptz_value").InnerText;
                foreach (HtmlElement i in webBrowserMain.Document.GetElementById("footer").Children)
                {
                    
                    i.Document.
                     // MessageBoxEx.Show(i.GetElementsByTagName("ptz-footer").GetElementsByName("ptz_value").ToString());
                    
                }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.