PROPERTY:  Document::parseError


The parseError property is read-only and returns an XMLDOMParseError object containing information about the last parse error.

In the following example the parseError property is used to create an XMLDOMParseError object after loading the XML file. Then the errorCode property is used to determine whether an error has occurred, and if so, a warning message is displayed.

Code (JavaScript):
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
err = xml_doc.parseError;
if (err.errorCode != 0) alert("Error: " + err.reason);

This property is a Microsoft extension to the W3C DOM.

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