The XMLDOMParseError Object

The XMLDOMParseError Object

The Microsoft XMLDOMParseError object holds information about the most recent parse error, including the error number, line number, character position, and a text description. Although it's not obvious to anyone who loads an XML document into Internet Explorer, the browser does validate the document using either a DTD or a schema, if one is supplied. It's not obvious that this happens because, by default, Internet Explorer does not display any validation error messages. However, if you use the XMLDOMParseError object, you can get a full validation report, and I'll do so in this chapter.

Here are the base properties of this object:

  • errorCode The error code of the most recent parse error. Read-only.

  • filepos The file position where the error occurred. Read-only.

  • line The line number that contains the error. Read-only.

  • linepos The character position in the line where the error happened . Read-only.

  • reason The reason for the error. Read-only.

  • srcText The full text of the line containing the error. Read-only.

  • url The URL of the XML document containing the last error. Read-only.

Note that this object does not have any methods or events, and it does not correspond to any official W3C object in the W3C DOM.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net