[snip] Can someone help me fix my code so that when I add an element I can also set some contents or a value for that element? example <serial_number>0000000</serial_number> [/snip]
$doc = domxml_new_doc("1.0"); $root = $doc->add_root("Server"); $root->set_attribute("Name", "pxtest01"); $el = $doc->create_element("Serial_Number"); $root->append_child($el); $el->append_child($doc->create_text_node('000000')); echo "<pre>"; $xmlfile = $doc->dump_mem(); echo htmlentities($xmlfile); echo "</pre>"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php