writeToStream
Puts the content of the data item associated with an XMLStream object into an OutputStream object.
Format 1
void writeToStream ( Xml-Destination ) |
Format 2
void writeToStream ( Xml-Destination, writeQualifiedTagNames ) |
Syntax rules
1. Xml-Destination is an object reference to java.io.OutputStream.
2. writeQualifiedTagNames is an alphanumeric data item or literal hosting a boolean value (e.g. "0", "1", "true", "false", "yes", "no", "on" or "off").
General rules
1. When the write method is invoked, the whole content of the data item associated with the XMLStream object is put into Xml-Destination.
NOTE - If the number of occurrences of an XML fields is not known at the time the program is written, specifying the
DYNAMIC phrase of the
OCCURS clause is recommended.
2. The XMLStream write method will indent the output according to the value of the property
iscobol.xmlstream.indent_number. The default is -1 which disables indentation. For example, to indent each level 2 columns set this property as follows:
iscobol.XMLStream.indent_number=2 |
4. If writeQualifiedTagNames is TRUE, namespaces as generated as prefix of the element name, in the form "ns#" where # is a progressive number. If writeQualifiedTagNames is FALSE or omitted, namespaces are generated as attribute of the element, in the form "xmlns=url".
Code example
... configuration section. repository. class xmlStream as "com.iscobol.rts.XMLStream" class outStream as "java.io.OutputStream" . ... working-storage section. ... 77 objXmlStream object reference xmlStream. 77 objOutStream object reference outStream. ... procedure division. ... set objOutStream to outStream:>new() objXmlStream:>writeToStream(objOutStream) ... |