Partager via


GetLineNumber (Compact 7)

3/12/2014

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

Syntax

HRESULT GetLineNumber (
  UINT* pcwchLineNumber
);

Arguments

  • pcwchLineNumber
    [out] Returns the line number

Return Value

Returns S_OK if no error is generated.

Remarks

This method is most useful for reporting the line number 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 line number of the first non-white-space text. This might not be what you expect: you might expect the line number of the start of the node. However, because XmlLite focuses on high performance so that the reader advances to the first non-white-space text. This method returns the line number where the reader is currently positioned in the document, not the line number of the start of the next node.

See Also

Reference

IXmlReader Methods
GetLinePosition
IXmlReader Properties
Error Codes