Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XElement.Attributes Method (XName)

Returns a filtered collection of attributes of this element. Only elements that have a matching XName are included in the collection.

Namespace:  System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)
public IEnumerable<XAttribute> Attributes(
	XName name
)

Parameters

name
Type: System.Xml.Linq.XName
The XName to match.

Return Value

Type: System.Collections.Generic.IEnumerable<XAttribute>
An IEnumerable<T> of XAttribute that contains the attributes of this element. Only elements that have a matching XName are included in the collection.

Attribute names must be unique within an element. Therefore, this axis method can return either a collection that contains only one attribute, or it can return an empty collection.

This method uses deferred execution.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.