adding / deleting / appending to xml
Posted: Sun Oct 05, 2008 3:09 am
is there any way to tell the xml file to put the data where i want...
eg
because i would like to append data in between the <user> tags
because at the moment its like this
and thats causing php to complain
is there a way where i can tell it to go inside the <user> tag?
eg
Code: Select all
<user>
<new>
<data></data>
</new>
<new>
<data></data>
</new>
</user>
because at the moment its like this
Code: Select all
<user>
<new>
<data></data>
</new>
</user>
<user>
<new>
<data></data>
</new>
</user>
Code: Select all
Warning: simplexml_load_file() [function.simplexml-load-file]: users.xml:30: parser error : Extra content at the end of the document in /var/www/part2/part2/php/login.php on line 11
Warning: simplexml_load_file() [function.simplexml-load-file]: <new> in /var/www/part2/part2/php/login.php on line 11
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /var/www/part2/part2/php/login.php on line 11
Fatal Error in opening xml doc