Mono Class Library: System.Xml.XmlReader Overview | Members

System.Xml.XmlReader.ReadAttributeValue Method

Parses an attribute value into one or more Text, EntityReference, and EndEntity nodes.

public abstract bool ReadAttributeValue ()

Returns

A bool where true indicates the attribute value was parsed, and false indicates the reader was not positioned on an attribute node or all the attribute values have been read.

Remarks

Note:

To parse an EntityReference node, call the XmlReader.ResolveEntity method. After the node is parsed into child nodes, call the XmlReader.ReadAttributeValue method again to read the value of the entity.

The XmlReader.Depth of an attribute value node is one plus the depth of the attribute node. When general entity references are stepped into or out of, the XmlReader.Depth increments or decrements by one, respectively.

Operation
As described above.

Note to Inheritors
Implementations that cannot expand general entities should return general entities as a single empty (XmlReader.Value equals string.Empty) EntityReference node.

Usage
Use this method after calling XmlReader.MoveToAttribute(string) to read through the Text , EntityReference, or EndEntity nodes that make up the attribute value. Call the XmlReader.ResolveEntity method to resolve the EntityReference nodes.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0