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.
Assembly: System.Xml (in System.Xml.dll)
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.Booleantrue if the attribute is found; otherwise, false. If false, the reader's position does not change.
| Exception | Condition |
|---|---|
| NullReferenceException | The name value is null. |
After calling MoveToAttribute, the Name, NamespaceURI, and Prefix properties reflect the properties of that attribute.
Show: