Share via


GetLinePosition (Compact 2013)

3/26/2014

This interface returns the line position where the reader is positioned in the document.

Syntax

HRESULT GetLinePosition (
    UINT* pcwchLinePosition
);

Arguments

  • pcwchLinePosition
    [out] Returns the line position

Return Value

Returns S_OK if no error is generated.

Remarks

This method is useful for reporting the position on the line if an error occurs.

The starting number is 1. For example, if the XML document is <root/> and the reader is on <, the line number is 1 and the line position is 1.

When you will read a node that contains white space and text, this method returns the position of the first non-white-space text. This might not be what you expect: you might expect the position of the first character of the node. Because XmlLite focuses on high performance, the reader advances to the first non-white-space text. This method returns the line position where the reader is positioned in the document, not the first position of the next node.

See Also

Reference

IXmlReader Methods
GetLineNumber
IXmlReader Properties
Error Codes