-
Xml Dom?
How do I add or write new data or node to my xml document using PHP's XML DOM? I've posted the structure of the xml document below:
<?xml version="1.0" ?>
<contacts>
<contact>
<fName>Peter</fName>
<lName>Alvaro</lName>
<eMail>zp8r2@yahoo.com</eMail>
</contact>
<contact>
<fName>Marylen</fName>
<lName>De Guia</lName>
<eMail>marylen_de_guia@yahoo.com</eMail>
</contact>
</contacts>
Thanks
-
1. Load document domxml_open_file
2. Find parent of new node get_element_by_id
3. Create new node create_element
4. Add new node to parent append_child
-
i got this error everytime i run the sample codes from those url.
Fatal error: Call to undefined function: domxml_open_file() in /var/www/html/!/test.php on line 3
any suggestion
-
Probably the function is not defined
See php manual, section requirements/installation
Or try old function xmldocfile()
Last edited by jofa; Jun 8, 2002 at 06:19.
-
i tried the old functions, they work but whenever i add a new node, it add it in one line instead of a tree
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks