START-DOCUMENT( ) method Creates the XML document with the prolog information. Note: You must call the SET-OUTPUT-DESTINATION( ) method to set the output destination for the XML document before invoking this method. Return type: LOGICAL Applies to: SAX-writer object handle Syntax START-DOCUMENT() You must call this method to start the output before you call any other writing methods or none of the writing methods will succeed. After you call START-DOCUMENT, the WRITE-STATUS is changed to SAX-WRITE-BEGIN. If START-DOCUMENT is called while the SAX-writer is already writing (that is, with a status other than SAX-WRITE-IDLE or SAX-WRITE-COMPLETE), then the method fails. If the SAX-writer is unable to write to the output destination, it generates an error message and change the WRITE-STATUS to SAX-WRITE-ERROR. If the FRAGMENT attribute is FALSE, then the XML declaration is created. The version, encoding style, and standalone state of the document is specified in the declaration. If the ENCODING attribute is not set, the declaration defaults to UTF-8, but this value does not appear in the declaration. If the VERSION attribute is not set, it defaults to “1.0”. If the STANDALONE attribute is not set, then the declaration default is to omit the attribute. Here is the default declaration: <?xml version="1.0"?> See also: END-DOCUMENT( ) method, SET-OUTPUT-DESTINATION( ) method
START-DOCUMENT()
<?xml version="1.0"?>