bruijn88 Posted September 15, 2006 Share Posted September 15, 2006 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:"[b]Notice:[/b] 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:News (rootNode)..|-item.......|-title.......|-description.......|-imageWhen 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.