Saving comments in a XML file
Here comes the article
Here i'll try to leave my progress in using an xml file as a database.
As a first experiment i have saved comments (you can make below this page) in an XML file and using this file for displaying the comments.
This is fairly easy, the only catch was to get a new comment in front of the closing comments tag (</comments>).
The file function solved this problem.
This simple script can be used for a simple guestbook, photogallery or whatever.
Check the two files xml-comments.php and insert_xml.php.
The next step will be in keeping different articles with their comments in one XML file and be abble to do searches in this file
See the XML file for this page: Comments1.xml


Comments:
test title 1
test desc 1
test 2
testing.....
Beatriz maakt een testje
enz...
date added
added a date field so we can see when the comment is posted. I added the date as an attribute to the comment tag.
The attribute
I\'m going to play a bit with the attributes.
test
test