readFromString
Reads an XML stream and puts its content in the data item associated with the XMLStream object.
Format 1
void readFromString ( Xml-Source )
Format 2
void readFromString ( Xml-Source, encoding )
Syntax rules
1. Xml-Source is an object reference to java.lang.String.
2. encoding is a string literal or data item that specified the character set to be used while parsing the XML stream. It accepts the same values as the iscobol.encoding * configuration property.
General rules
1. When the read method is invoked, the whole content of Xml-Source is read and the data item associated with the XMLStream object is updated.
 
NOTE - If the number of occurrences of an XML field is not known at the time the program is written, specifying the DYNAMIC phrase of the OCCURS clause in the data item associated with the XMLStream object is recommended.
Code example
...
configuration section.
repository
    class xmlStream  as "com.iscobol.rts.XMLStream"
    class JString    as "java.lang.String"
    .
...
working-storage section.
...
77 objXmlStream object reference xmlStream.
77 objString    object reference JString.
...
procedure division.
...
objXmlStream:>readFromString(objString)
...