Compability: Internet Explorer
This property contains the URL of the XML document containing the last error.
XML:
<Vocabulary>
<Word
type="noun"
level="1">
<English>cat</English>
<Spanish>gato</spanish>
</Word>
<Word
type="verb"
level="1">
<English>speak</English>
<Spanish>hablar</Spanish>
</Word>
</Vocabulary>
VBScript:
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("vocabulary.xml")
Set ParseErr = objXMLDoc.parseError
If ParseErr.errorCode <> 0 Then
alert("Error in file: " & vbCrLf & ParseErr.url)
End If
Error in file:
http://www.devguru.com/somedir/vocabulary.xml
In this 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.