I've been puzzling with this problem for the last two days and can't figure it out..
What i'm trying to do is adding (news)item to an xml file (i didn't use rss, don't ask me why..) with the DOM-interface for a small CMS.
So far that all working fine, the values from the form are beiing added as a new item at the end of the document (but within the rootNode of course)
The issue is that the added node is written on just one line, and for some reason the script that lists the newsitems can't deal with that.
It gives me the following error:
"Notice: Trying to get property of non-object in ... "
In addition to that it also 'mixes up' some nodes.
De structure of the xml file is as follows:
When it lists the items, the description is shown instead of the title.
When i mark the (newly added item) up tidy and put all the childNOdes of 'item' on a new line, everything works fine.
I couldn't find anything apart from the php-function 'tidy_repair_file', but this library is not installed on the server is going to run on, so that soen't help m emuch either.
I'm fresh out of solutions, suggestions anyone?
php script acts weird with DOM-generated xml file
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users