bilalaslam777 Posted September 1, 2009 Share Posted September 1, 2009 Hello Guys, i am trying to insert node in xml but its not working as i am newbie in Parsing so please help me. here is the code <?php //how to add new nodes in xml $source='books.xml'; $dom = new DOMDocument(); $dom->load($source); $books = $dom->createElement('books'); $name = $dom->createElement('name'); $text = createTextNode('Adobe Photoshop Beginning Learner'); $name->appendChild($text); $books->appendChild($name); $dom->documentElement->appendChild($books); echo $dom->saveHtml(); ?> Thanks in advance[/][/color] Link to comment https://forums.phpfreaks.com/topic/172662-xml-parsing/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.