WRITE-STATUS attribute

The current state of a XML write in a SAX-writer object.

Data type: INTEGER

Access: Read-only

Applies to: SAX-writer object handle

The default value is SAX-WRITE-IDLE.

The possible values WRITE-STATUS can assume are shown in the following table.

WRITE-STATUS attribute values
WRITE-STATUS Description Integer value
SAX-WRITE-IDLE No writing has occurred. 1
SAX-WRITE-BEGIN The START-DOCUMENT method has been called and writing has begun. 2
SAX-WRITE-TAG The writer has written an opening tag. This is the only time that attributes can be inserted with INSERT-ATTRIBUTE and DECLARE-NAMESPACE. 3
SAX-WRITE-ELEMENT The writer is within an element. 4
SAX-WRITE-CONTENT The writer has written the content of an element. In other words, the WRITE-CHARACTERS method has been called. 5
SAX-WRITE-COMPLETE The END-DOCUMENT method has been called and writing is complete. 6
SAX-WRITE-ERROR The SAX-writer could not start or could not continue. Likely causes include: SAX-writer could not be loaded, the XML target could not be written to, a method call fails, etc.

This is the status if there is an invalid XML generated while STRICT is TRUE.

If the status is SAX-WRITE-ERROR then no attributes can be written and the only method that can be called is RESET.

7