473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

generate xml with subnode

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..
Jul 20 '05 #1
2 1705
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.
"grant" <gr******@yahoo.ca> wrote in message
news:d0**************************@posting.google.c om...
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..

Jul 20 '05 #2
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.

"grant" <gr******@yahoo.ca> wrote in message
news:d0**************************@posting.google.c om...
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..

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Almoni | last post by:
Hi, I have a few .xsd files that include each other in the following way: <!-- lets call the main schema file AA.xsd and it includes BB.xsd inside it --> <xs:schema...
3
by: Garry Dawkins | last post by:
Hey Frank, I'm a novice with this taking over someone elses application. I'm attempting to add a dataset to a page. I have the query to populate the page and I have the walkthrough instructions. ...
0
by: TRAX | last post by:
I've got a weird problem: when i try to delete a treenode containing subnodes the last node isn't removed: it gives the object reference not set to ... error. Here's my code: Dim lclsSubNode As...
1
by: jtsree | last post by:
I am Using (Windows XP) Visual Studio.net 2003 professional edition working on VB.net language. I am bulding a very very simple project in VB.net where i connect to Access Database by dragging...
9
by: Henk Verhoeven | last post by:
We are not alone! "Where other MDA tools are generating programmingcode, Codeless chooses not to generate code at all". OK, phpPeanuts is not an MDA tool (it has no fancy modeling GUI). But it...
4
by: Stephen | last post by:
I need to generate input XML for another application by serialising classes defined in an XSD document. The code below will generate the XML I require but I need to generate this in memory rather...
1
by: A Traveler | last post by:
Hello, i am having this problem. The exact error message is: "Unable to generate code for a value of type 'System.Web.UI.Page'. This error occurred while trying to generate the property value for...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: bthubbard | last post by:
This may not be the best group in which to post this. If there is a better location please direct me there. I have been experimenting with Sandcastle to generate CHM help file documentation for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.