A simple program that uses xml??

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,

Can somebody please help me on this:
- I have the following xml file:

<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; "<span style="color:Blue; ?>
<span style="color:Blue; <<span style="color:#A31515; questions<span style="color:Blue; >

<span style="color:Blue; <<span style="color:#A31515; entry <span style="color:Red; serial<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; a<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; question<span style="color:Blue; >Question number 1?<span style="color:Blue; </<span style="color:#A31515; question<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; a<span style="color:Blue; >Answer A<span style="color:Blue; </<span style="color:#A31515; a<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; b<span style="color:Blue; >Answer B<span style="color:Blue; </<span style="color:#A31515; b<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; c<span style="color:Blue; >Answer C<span style="color:Blue; </<span style="color:#A31515; c<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; d<span style="color:Blue; >Answer D<span style="color:Blue; </<span style="color:#A31515; d<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; correct<span style="color:Blue; >a<span style="color:Blue; </<span style="color:#A31515; correct<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; entry<span style="color:Blue; >

<span style="color:Blue; <<span style="color:#A31515; entry <span style="color:Red; serial<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; b<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; question<span style="color:Blue; >Question number2?<span style="color:Blue; </<span style="color:#A31515; question<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; a<span style="color:Blue; >20<span style="color:Blue; </<span style="color:#A31515; a<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; b<span style="color:Blue; >19<span style="color:Blue; </<span style="color:#A31515; b<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; c<span style="color:Blue; >12<span style="color:Blue; </<span style="color:#A31515; c<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; d<span style="color:Blue; >18<span style="color:Blue; </<span style="color:#A31515; d<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; correct<span style="color:Blue; >d<span style="color:Blue; </<span style="color:#A31515; correct<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; entry<span style="color:Blue; >

<span style="color:Blue; </<span style="color:#A31515; questions<span style="color:Blue; >
[/code]

- I need a C#/C++ console program that:
Reads through the above file and compares a string with the
serial attribute.
Retrieves the values of the
a,b,c,d,correct tags found within the entry that holds the matching serial.

I appreciate your assistance,
Samer <hr class="sig Still On Progress :)

View the full article
 
Back
Top