Reading XML from a String:

    The second paramter hints Spin to use the XML data format for parsing the XML.

    Reading XML from a Reader:

    Spin also supports reading XML directly from a :

    Reading XML using a Script Language

    XML can be read from script languages in the same way as from Java. Since script languages use dynamic typing, you do not need to hint the data format but you can use autodetection. The following example demonstrates how to read XML in JavaScript: