<style>
/* custom styles for this example */
#demo input, #demo label {display:block;}
#demo fieldset {margin:1em;}
#demo textarea {width:40em;height:8em;}
</style>

<div class="intro">
    <p>The XML module of the DataType Utility allows you to take a string and convert it to an XML document.</p>
</div>

<div class="example yui3-skin-sam">
    {{>datatype-xmlparse-source}}
</div>

<p>To convert a string to an XML document, simply call the <code>parse()</code> function of the Y.XML class:</p>

```
YUI().use("datatype-xml", function(Y) {
    var output = Y.XML.parse("<myroot><item type='foo'>...</item></myroot>");
    // output is an XML document
});
```

<p>Full example source:</p>
```
{{>datatype-xmlparse-source}}
```


