XML.parse(string)
Parse a string and return an XML object. The current location is set to the root element of the document. The parse function will throw an error if the string is not valid XML (errors can be caught using the pcall function).
Example
doc = XML.parse([[
<config version="1.0">
<option type="type1">value1</option>
<option type="type2">value2</option>
</config>]])