Microsoft XML SDK 2.6 - XML Reference

filepos Property

Contains the absolute file position where the error occurred.

lValue = oXMLDOMParseError.filepos

Remarks

Long integer. The property is read-only.

Example

The following VBScript example attempts to load an XML document. If it encounters a parse error, it displays the value of the filepos property.

Dim xmlDoc
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
If xmlDoc.parseError.errorcode <> 0 Then
   MsgBox xmlDoc.parseError.filepos
Else
  MsgBox xmlDoc.documentElement.xml
End If

See Also

Applies To: XMLDOMParseError Object