Reading XML from a String:
xml() hints Spin to use the XML data format for parsing the XML.
Alternatively, you can directly use the XML(...) function:
Reading XML from a Reader:
Spin also supports reading XML directly from ajava.io.Reader:
XML(...) method also supports readers. The following example shows how to read the XML from a file (error handling ommitted):