This project has moved and is read-only. For the latest updates, please go here.

public ElementWalker

Oct 14, 2012 at 2: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 12:57 PM

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.