SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Xml Dom?
-
Jun 5, 2002, 00:57 #1
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
-
Jun 7, 2002, 15:53 #2
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Jun 8, 2002, 02:37 #3
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
-
Jun 8, 2002, 06:15 #4
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
-
Jun 10, 2002, 03:02 #5
i tried the old functions, they work but whenever i add a new node, it add it in one line instead of a tree
Bookmarks