|
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]
|