tags:

views:

442

answers:

2

I started to play with GeckoFX. Unfortunately I didn't found any big documentation for that. I need to get DOM tree for the page. Iterate every element and get it's information. Can someone please help me?

A: 

nsIDOMNode will provide you the DOM traversing ability. You can start from the Document node. You can look into the nsInterfaces.cs file for the interface details.

Priyank Bolia
+1  A: 

Example code:

GeckoElementCollection links = geckoWebBrowser1.Document.GetElementsByTagName("a");
foreach (GeckoElement link in links) {
    Debug.WriteLine(link.GetAttribute("href"));
}
Sire