Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
linepos Property
Collapse the table of content
Expand the table of content

linepos Property

Contains the character position within the line where the error occurred.

lValue = oXMLDOMParseError.linepos;


The following script example attempts to load an XML document. If it encounters a parse error, it displays the line and position within that line where the error occurred.

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
xmlDoc.async = false;
if (xmlDoc.parseError.errorCode != 0) {
  WScript.Echo("A parse error occurred on line " + xmlDoc.parseError.line 
  + " at position " + xmlDoc.parseError.linepos);
} else {

lValue = oXMLDOMParseError.linepos

HRESULT get_linepos(
    long *linePosition);


linePosition[out, retval]

The character position within the line where the error occurred.

C/C++ Return Values


The value returned if successful.


The value returned if no error occurred.

Long integer. The property is read-only.

Implemented in:

MSXML 3.0, MSXML 6.0

© 2015 Microsoft