GetLineNumber

 

Gets the line number where the reader is positioned in the document.

  
HRESULT GetLineNumber ([out] UINT * pcwchLineNumber);  

pcwchLineNumber
Returns the line number.

Returns S_OK if no error is generated.

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 are about to read a node that contains whitespace and text, this method returns the line number of the first non-whitespace text. This may not be what you expect; you may expect the line number of the start of the node. However, XmlLite's focus is on high performance, and for performance the reader advances to the first non-whitespace 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.

Header: XmlLite.h

Library: XmlLite.lib

GetLinePosition
IXmlReader Methods

Show: