Saving Jquery generated html content to xml

I am trying to create a fairly simple editor with the purpose of having an easy way to create questionnaires which will then be sent to customers to fill them out and have em sent back to us. So the editor part is done with jquery, i just add the desired html elements (text/buttons) on button click. The visual part works. Now of course a created template should be savable and loadable via xml.

The saving to file part is what I have not yet figured out.

The way I was about to go was just taking the whole html document and parse it via php. But this seems to be a non-ideal solution.

The problem is that my experience is fairly limited and I just wanted to do this as a convenience/hobby project so I constantly feel like I am doing things the stupid way. So I am completely open to whichever way is best to accomplish this task.

So to give you an example i would have created:

<input type="checkbox" id="checkId1" /><label for="checkId1">Sample Answer</label>
<textarea type="text" name="questionText" id="questionText1" value="Sample Question Text"></textarea>

and want to convert this to an xml that looks sort of like

<QuestionText>Sample Question Text</QuestionText>

Which I am then going to convert back to html when parsed with jquery.


     I think this is what you mean!

     1. you xml 
         <QuestionText>Sample Question Text</QuestionText>
     2. Then parse xml using JS

                url:'your xml file',
                success: function(data){

                 $('div.caption').append("<input type='checkbox' id='checkId1'>" 

                 +"<label for='checkId1'>"
                 +"<textarea type='text' name='questionText' id='questionText1'" +"value='"$(this).find('QuestionText').text()"'>"


     3. HTML <div class='caption'></div>

    Hope this will help! Tnx

Need Your Help

Asynchronous operation exception if I want to create an instance of a class


I am currently working on a big page, created by a lot of other developers, used by a lot of people internally. I got a rather simple task to modify the page, for that I had to create a cla...

typed-Dataset VS Own access Database classes

sql-server-2005 stored-procedures strongly-typed-dataset

Hi i would like to know if it's better to use typed-dataset rather than Own access with Datareader and Store procedure?