<p>How to create a DOM from a User's input in PHP5?</p>

I would use the DOM API that has been part of the core since 5. For an XML string $xml, you can build a DOM object with
```
```
$dom = new DOMDocument();
$dom->loadXML($xml);
```
```
Manipulate it with the rest of the DOM API, defined at
http://uk.php.net/DOM