You are here: Re: Edit XML like a DB woth web form? « All PHP « IT news, forums, messages
Re: Edit XML like a DB woth web form?

Posted by Djeemale Dotcom on 01/03/08 09:53

Try loading the XML file, thus:

if (file_exists('./xml/yourdb.xml')) {
$xml = simplexml_load_file('./xml/yourdb.xml');
} else {
exit('Failed to open yourdb.xml.');
}

Then assign the node data to variables and display in forms for editing
using PHP. Finally write back your XML file like this.

$xml->asXML('./xml/yourdb.xml');

Hope this is of some help.


Pupkin wrote:
> Hi,
>
> I have a site that takes info from a form and adds it as a record to an
> XML file (RSS format), using the XML as a light-weight db.
>
> Now I need to build a web-based management app for the data in the XML
> file, where the user can grab a record from the XML file, edit it, and
> save the changes back to the XML file.
>
> I've done this same kind of recordset thing with an sql database, but
> not with XML. Is there a simple open source app that already does this?
> Where all I'd need to modify is the elements in the editing form?
>
> I just need a reference to look at in terms of grabbing the data from
> items in the XML and saving it back.
>
> Thanks.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация