- simplexml_load_string: documentation ( source)
<?php
$dom=simplexml_load_string("<test></test>");
$dom->addChild(">.<","1,2,3");
$xml=$dom->asXML();
echo $xml;
/* echos:
<?xml version="1.0"?>
<test><3D>1,2,3</3D></test>
*/
$dom=simplexml_load_string($xml);
/*
generates a whole lots of warnings,
and refuses to create an object.
*/