Thursday, April 3, 2014

Loop through HTML Elements using GeckoFX WebBrowser

C#:
1
2
3
4
5
//Note: this.DomDocument is a class which inherits the GeckoWebBrowser control
foreach (GeckoElement element in this.DomDocument.GetElementsByTagName("span"))
{
   //some codes here
}

VB.NET:
1
2
3
4
'Note: this.DomDocument is a class which inherits the GeckoWebBrowser control        
For Each element As GeckoElement In Me.DomDocument.GetElementsByTagName("span")
    'some codes here
Next

0 comments:

Post a Comment