NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlReader.GetAttr (XmlIdent)

Returns the value of an attribute in a start tag.

[Visual Basic]
Overloads Public Function GetAttr( _
   ByVal id As XmlIdent _
) As String
[C#]
public string GetAttr(
   XmlIdent id
);
[C++]
public: String* GetAttr(
   XmlIdent* id
);
[JScript]
public function GetAttr(
   id : XmlIdent
) : String;

Parameters

id
The identifier of the attribute to obtain.

Return Value

The value of the attribute, or null if the reader is not positioned on a start tag or if the start tag does not contain an attribute with the given identifer.

Exceptions

Exception Type Condition
ArgumentException If id is null or does not belong to the same XML context as this reader.

Remarks

When the reader is positioned on a start tag, this method can be used to obtain the value of a given attribute. The return value is null if the reader is not positioned on a start tag or if the start tag does not contain an attribute with the given identifier.

To obtain the identifier and value of each attribute of a start tag, use the ReadAttr method.

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace | XmlReader.GetAttr Overload List | GetAttr | GetAttr | ReadAttr