This topic has not yet been rated - Rate this topic

Elements (XElement Dynamic Property)

Gets an indexer used to retrieve the child elements of the current element that match the specified expanded name.

elem.Elements[{namespaceName}localName] 

An indexer of the type IEnumerable<XElement> Item(String expandedName). This indexer takes the expanded name of the desired child elements and returns the matching child elements in an IEnumerable<XElement> collection.

This property is equivalent to the XContainer.Elements(XName) method of the XContainer class.

The elements in the returned collection are in XML source document order.

This property uses deferred execution.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.