Sunday, November 18, 2012

Answers > What Is the Best Way to Store/process a XML Datafile?

What Is the Best Way to Store/process a XML Datafile?

by nForms on August 23, 2012

I want to use XML as datafile,but I have a lot of information (many entries).

1. Do I need to make many file for each entry. or use one XML file to store all entries?

2. I am planning to use AJAX as UI to get the XMLHttpResponse from the server (PHP based).
I would like to modify the XML file immediately like Flickr.
What should I do to append/modify new data on the XML file in Server?

Thank you!

Tags: , , , , , ,

Similar XForms | XML Posts

{ 1 comment… read it below or add one }

gstoll2003 June 19, 2011 at 4:47 pm

1. It’s probably easier to store everything in one file, but that might lead to performance issues when parsing the XML. I’d try it that way first, and then change to the many-files model if it’s too slow.

2. I’ve done a project like this (see sources below), and the way I handled it was to write a backend Python or PHP (or whatever) script to modify the XML file. When the user changes something, do a POST to that script, and the script modifies the XML file appropriately. (then reload the XML file to get the updated data).

Feel free to play around with my site, look at my code and take it for your own uses – the javascript code and backend Python code is all available at the site below.

Previous post:

Next post: