MoveToAttribute Method (String, String)
Collapse the table of content
Expand the table of content

XmlReader.MoveToAttribute Method (String, String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

When overridden in a derived class, moves to the attribute with the specified LocalName and NamespaceURI.

Namespace:  System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public abstract bool MoveToAttribute(
	string name,
	string ns
)

Parameters

name
Type: System.String
The local name of the attribute.
ns
Type: System.String
The namespace URI of the attribute.

Return Value

Type: System.Boolean
true if the attribute is found; otherwise, false. If false, the reader's position does not change.

ExceptionCondition
NullReferenceException

The name value is null.

After calling MoveToAttribute, the Name, NamespaceURI, and Prefix properties reflect the properties of that attribute.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft