method fromXML

void fromXML(stream encodedValues);

Argumente

Zurückgegebener Wert

This method creates the array values from a XML UTF-8 encoding that was returned from toXML. All values are removed from the array first.
var arrayObj = shell.serviceManager.basics.array;
arrayObj.addValue(42);
arrayObj.addValue("Hello World");

var users = shell.serviceManager.basics.array;
users.addValue("john");
users.addValue("tom");

arrayObj.addValue(users);
arrayObj.addValue(false);

var xmlStream = shell.serviceManager.basics.memoryStream;
arrayObj.toXML(xmlStream);
/*The resulting XML in the stream will look like this:
<array>
  <int32>42</int32>
  <string>Hello World</string>
  <array>
    <string>john</string>
    <string>tom</string>
  </array>
  <bool>false</bool>
</array>
*/

arrayObj.fromXML(xmlStream);
xmlStream.close();
/*fromXML will remove all the elements first
The resulting array will look like this:
42
Hello World
Basics::array Object
    john
    tom
false
*/