Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 6
    This only works if the node name is unique in the set. If it's not, you end up removing all nodes of the same name. Commented Dec 6, 2012 at 16:34
  • 3
    @Dallas: What you comment is right, but it also contains the solution. How to access the first element only? See here: stackoverflow.com/a/16062633/367456 Commented Apr 17, 2013 at 14:30