System.Xml.XmlValidatingReader.LinePosition Property

Gets the current line position.

Syntax

public int LinePosition { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Note:

The System.Xml.XmlValidatingReader class is obsolete in dnprdnext. You can create a validating System.Xml.XmlReader instance by using the System.Xml.XmlReaderSettings class and the erload:System.Xml.XmlReader.Create method. For more information, see Validating XML Data with XmlReader.

This property is most commonly used for error reporting, but can be called at any time. The starting value for this property is 1.

The position indicated is the first character of text in the markup.

Example

<root>
 abc<tag/>
</root>

On the first line of the preceding XML text, a LinePosition of 2 corresponds to the character r; on the second line, a LinePosition of 5 corresponds to the character t; and on the third line, a LinePosition of 3 corresponds to the character r.

Combined with XmlValidatingReader.LineNumber, a value of 1,1 indicates the start of the document.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0