Click to return to the XML (Extensible Markup Language) home page    
XMLDOMParseError line Pro...     XMLDOMParseError reason P...     XMLDOMParseError Object    
Web Workshop  |  XML (Extensible Markup Language)

linepos Property


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

Syntax

lValue = oXMLDOMParseError.linepos

Remarks

Long integer. The property is read-only.

Example

The following 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:

Dim xmlDoc

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
If xmlDoc.parseError.errorcode <> 0 Then
   MsgBox ("A parse error occurred on line " & xmlDoc.parseError.line _
   & " at position " & xmlDoc.parseError.linepos)
Else
  MsgBox xmlDoc.documentElement.xml
End If

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMParseError


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.