generate xml with subnode

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..
 
G

Gregory Vaughan

If your survey question/answers are in an ODBC database, you might consider
our ODBC2XML product (shareware):

http://www.intsysr.com/odbc2xml.htm

You could embed the queries in an XML template and then easily generate a
set of XML question/choice combinations from the DB.
 
M

Martin SChukrazy

To generate XML directly from a recordset is possible using Data
Transformation Toolkits such as DataJunction. or even OODBMS based toolkits
such as Excelon etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,821
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top