PROPERTY:  ParseError::url

This property is a Microsoft extension to the W3C DOM.


The url property is read-only and contains the URL of the XML document containing the last error.

In the following example the file 'vocabulary.xml' is loaded which includes an error: the closing 'Spanish' tag of the first 'Word' element is spelled with a lower case 's'. If a parse error occurs, as it does in this case, an alert displays the URL of the XML file where it occurs.

Where no parse error occurs, the errorCode property returns 0.

   <Word type="noun" level="1">
   <Word type="verb" level="1">

Code (VBScript):
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
Set ParseErr = objXMLDoc.parseError
If ParseErr.errorCode <> 0 Then
   alert("Error in file: " & vbCrLf & ParseErr.url)
End If

The alert displays the following message:

Error in file:

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information