I am building a site that is an interface used to create XML files that are read as input by a server side program.
The website allows users to dynamically create blocks of HTML. Each block can be thought of as an object and contains several input fields. When the user submits the form, the data is turned into an XML file.
What is the best way to preserve/rebuild the user generated HTML across the post request? I am using JQuery, but not AJAX.
What strager said. Plus, with Javascript you can get the HTML string for any element:
And send that to your server for inclusion in your CDATA XML element and you should be good.
Although the whole idea of capturing HTML to send to an API for some purpose just reeks of a code smell, without knowing what you are up to I can’t say much more about that.