XML Parsing

G

Guest

Hi People,

I am building a test hierarchy, in asp.net using c#. How do we write the
values from a web-form, where I enter the hierarchy of the test-paper, in to
XML form, then in to a mySQL D/base. How do we deal with XML in c#. My
database structure, in which I want the data to go in to is given below: -

Test-Details table: -

Subject Level Marks NumQuestions
Physics A-Level 100 2

Question-Details table: -

Subject Level Question-Id Parent NumSubParts
Physics A-Level 1 null 2
Physics A-Level 1.1 1 0
Physics A-Level 1.2 1 0
Physics A-Level 2 null 0

Marks Table: -

Subject Level Question-Id Marks
Physics A-Level 1.1 25
Physics A-Level 1.2 25
Physics A-Level 2 50

The web-form basically requires the user to enter in details for the test to
be built, i.e. number of questions, details for individual question, and then
marks for each root node, i.e. the last sub-part down the tree.

How can I parse the web-form data in to xml structure and then use that to
plonk the data in to the mySQL D/base.

Your views will be very much appreciated.

Many thanks,

Irfan
 
N

Nicholas Paldino [.NET/C# MVP]

Irfran,

Why bother with the XML at all? I mean, wouldn't it be easier to just
use the data access providers for mySql and just enter the data directly
into the database? Why the intermediate step?
 

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

Top