Link to home
Start Free TrialLog in
Avatar of asp123
asp123

asked on

Loading XML Document in SQL Server 2000

I have a XML Document which is structured like below and will need to load the data into SQL Server 2000. Here the <QuestionType>, <item> and nodes under <item> are optional.

Is there a way this could be loaded into SQL Server directly?

If I choose loading it reading it node by node in C# in .NET, Can someone point to some example code?

Greatly appreciate any advice and help on this!

<section>
<question>
<questionid>q1</questionid>
<questiontext>What is your name?</questiontext>
<questionlogic>If q1 not empty then go to q2 else go to END<questionlogic>
</question>
<question>
<questionid>q2</questionid>
<questiontext>What is your mailing address?</questiontext>
<questionlogic>If address provided  then go to q3 else go to END<questionlogic>
<item>
<itemname>Address</itemname>
<itemtype>Text</itemtype>
</item>
<item>
<itemname>City</itemname>
<itemtype>Text</itemtype>
</item>
<item>
<itemname>State</itemname>
<itemtype>DropDown</itemtype>
<options>
<option>NY</option>
<option>VA</option>
<option>DC</option>
</options>
</item>
<item>
<itemname>Zip</itemname>
<itemtype>Text</itemtype>
</item>
</question>
<question>
<questionid>q3</questionid>
<questiontype>Radio</questiontype>
<questiontext>Please choose incentive option?</questiontext>
<questionoptions>
<questionoption>Cash</questionoption>
<questionoption>GiftCard</questionoption>
</questionoptions>
<questionlogic>If q3 selected then go to q4 else go to END<questionlogic>
</question>

</section>
ASKER CERTIFIED SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twoboats
twoboats

Have a look in Books Online at OpenXML - let's you open a xml docs directly.
I gave some possible solution, unfortanly no response from asker.
I see 2 possible solutions:
- answered by me
- delete, no refund
Or maybe they used OPENXML