I've started getting into AJAX and familiarising myself with the DOM. I understand the tree schema (I've used similar myself in language parsing) and how to modify it using JavaScipt.
What I want to do is to allow my members to re-position elements on a few of the pages. At the moment I'm saving any changes in an external text file and, using php, creating the page "on the fly" before it is sent to the browser. This means I have to start with a template and apply the changes each time the page is loaded. That is slow, cumbersome, error-prone and not easy to change if I want to add more functionality or the member changes things again (multiple change logs!).
Is there a simple way of converting the modified DOM back to HTML so that I can simply save the new version of the page? I really don't want to go to the hassle of writing my own parser to do it.
Incidentally, the pages concerned are pure HTML. There is no JavaScript or php involved.
What I want to do is to allow my members to re-position elements on a few of the pages. At the moment I'm saving any changes in an external text file and, using php, creating the page "on the fly" before it is sent to the browser. This means I have to start with a template and apply the changes each time the page is loaded. That is slow, cumbersome, error-prone and not easy to change if I want to add more functionality or the member changes things again (multiple change logs!).
Is there a simple way of converting the modified DOM back to HTML so that I can simply save the new version of the page? I really don't want to go to the hassle of writing my own parser to do it.
Incidentally, the pages concerned are pure HTML. There is no JavaScript or php involved.
