rendered paste body<?phprequire_once('xml_domit_parser.php');$parser =& new DOMIT_Document();if($parser->loadXML('test.xml')){ $image = $parser->createElement('image'); $image->appendChild($parser->createTextNode('imagefile.jpg')); $link = $parser->createElement('link'); $link->appendChild($parser->createTextNode('the_link')); $pic = $parser->createElement('pic'); $pic->appendChild($image); $pic->appendChild($link); $images = $parser->getElementsByTagName('images')->item(0); $images->appendChild($pic); $handle = fopen('test.xml', 'w'); fwrite($handle, $parser->toNormalizedString()); fclose($handle);}else{ echo '<h1 style="color: #fcc;">Error while reading the XML file.</h1>';}?>