Specifies the line number that contains the error.
Syntax
lValue = oXMLDOMParseError.line
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 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)
Else
MsgBox xmlDoc.documentElement.xml
End If
Applies To