Name
XML.status Property — indicates whether parsing XML source into an object hierarchy was successful
Availability
Flash 5
Synopsis
XMLdoc.status
Access
Read-only
Description
The status
property returns a numeric status code
indicating whether any errors were encountered when parsing XML
source code. Parsing occurs when source XML is:
Provided as an argument to the
XML( )
constructor
Explicitly parsed via the
parseXML( )
method
Loaded into a new
XML
object via theload( )
orsendAndLoad( )
methods
The
status
codes are
shown in Table 20.14. If no errors were encountered
in parsing, success is indicated by a status
of 0.
Errors are indicated by negative numbers. Parsing terminates once the
first error is encountered, so other errors may surface even after
you address previously reported errors.
Table 20-14. XML Parsing Status Codes
Status |
Description |
---|---|
0 |
The document parsed without errors (i.e., success). |
-2 |
A CDATA section was not properly terminated. |
-3 |
The XML declaration was not properly terminated. |
-4 |
The |
-5 |
A comment was not properly terminated. |
-6 |
An XML element was malformed. |
-7 |
Not enough memory to parse the XML source. |
-8 |
An attribute value was not properly terminated. |
-9 |
A start tag had no corresponding end tag. |
-10 |
An end tag had no corresponding start tag. |
We normally use status
to determine whether
it’s safe to proceed with processing an externally loaded XML
file. Check the
loaded
property to ensure ...
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.