G
grant
Hi guys:
I am try to build an online query application and would like to
generate xml file like following:
<survey name="Example Survey">
<question type="text" name="Title" required="yes"/>
<question type="text" name="Industry"/>
<question type="radio" name="Education">
<choice value="High school"></choice>
<choice value="Some college"></choice>
<choice value="College"></choice>
</question>
</survey>
there will be two tables as follows:
question table will contain name, type , questionID field
answer table will contain answerID , questionID, answer field.
each question will have multiple choices as answers.
I wonder if there is a way to generate the xml file from dataset
directly. The only way I can think of right now is to read all the
questions to a xml file first and loop each question node and add
subnode (choice) into it. Is there a better way to do this?
Thanks..
I am try to build an online query application and would like to
generate xml file like following:
<survey name="Example Survey">
<question type="text" name="Title" required="yes"/>
<question type="text" name="Industry"/>
<question type="radio" name="Education">
<choice value="High school"></choice>
<choice value="Some college"></choice>
<choice value="College"></choice>
</question>
</survey>
there will be two tables as follows:
question table will contain name, type , questionID field
answer table will contain answerID , questionID, answer field.
each question will have multiple choices as answers.
I wonder if there is a way to generate the xml file from dataset
directly. The only way I can think of right now is to read all the
questions to a xml file first and loop each question node and add
subnode (choice) into it. Is there a better way to do this?
Thanks..