public ElementWalker

Oct 14, 2012 at 1:49 AM

I was trying create some method to access all Placemarkers within a KmlObject. To do this correctly I need to understand the entire Kml-model in order to walk down the paths of different classes to access the Placemarker instances.

The Element.Children property i internal and so is the ElementWalker class. So I cannot figure out any good general way to access all elements of a certain type.

Any suggestion what I could do?

Does the ElementWalker class have to be internal, is there an important design decision behind this?

Oct 14, 2012 at 11:57 AM

Just a quick reply for the moment; I'll take a look at your other discussions later today.

To get elements of a certain type you can use the Flatten extension method and then the LINQ OfType extension method - there's an example of this here.