I am implementing a XML database for my webpage. The idea is that the user will enter their information into a simple HTML form. My javascript will then parse, validate and then append the data as as new nodes to my XML file.
I have done the parsing of the form by document.getElementByID().value (which works well), and loaded and edited my XML document with the *.appendChild() method. However, nothing happens to the XML file that was loaded.
I occurred to me that maybe I had to 'commit' my changes, but I cannot find the correct method to do so on the w3c schools. I have found a micro$oft extention to the XML DOM that is called *.save() that I suppose would do the job. I am no fan of micro$oft however, and having made the rest of my site standards-compliant, it feels like crap having to use *one* MS extension.
Bottom line: Is there a standards-compliant way of saving an XML document to a file on the server?
You look like you were working on the same problem of committing the xml file that I've been working on. I wanted to POST the xmlDoc once I'd modified text nodes but have discovered you can't commit it the server without something in between.
Could you share the PHP script you put together? Also the way you posted the xml file changes to the PHP script.
Thanks.
Sure. This is the script I threw together. I do not pretend to have any understanding of PHP, but it does what it was supposed to do. For the actual presentation of the database I have written a small piece of XSLT. You can find more information on www.w3schools.com.
Bookmarks