Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Need a Code Example of XML in C#

Reply
Thread Tools

Need a Code Example of XML in C#

 
 
redlightpacket@wmconnect.com
Guest
Posts: n/a
 
      12-17-2006
I need some C# code to read the stuff in a file. I want to display the
question in a text box. I want the answers to display in a label. Like
"LabelA, LableB, LabelC, LabelD". I also want it so I can skip to
specific question numbers in the xml file like "<question = 000002>" so
I can bring up different kinds of questions.


<quelist>
<question = 000001>
<quetext>
Who is the richest person in the world?
</quetext>
<que = 000001 answer = A>
A. Bill Gates
</que>
<que = 000001 answer = B>
B. Larry Ellsion
</que>
<que = 000001 answer = C>
C. Bill Ford
</que>
<que = 000001 answer = D>
D. Sam Walton
</que>
</question>
<question = 000002>
<quetext>
Who is the richest person in the world?
</quetext>
<que = 000002 answer = A>
A. Bill Gates
</que>
<que = 000002 answer = B>
B. Larry Ellsion
</que>
<que = 000002 answer = C>
C. Bill Ford
</que>
<que = 000002 answer = D>
D. Sam Walton
</que>
</question>
</quelist>

The xml stuff below is another thing I want code to. I need some C#
code to write data to a xml file in the format below. Thanks for your
help...

<anslist>
<ans = 000001>
A
</ans>
</anslist>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a Code Example of XML in C# redlightpacket@wmconnect.com XML 0 12-17-2006 02:49 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Example of an XML document with an inline xml schema WideBoy XML 8 12-22-2005 06:42 PM
'example.com' == 'example.com.' => false... is this intended? Sam Roberts Ruby 15 02-07-2005 04:36 PM
XML translation by IE? (Inside XML book example) jeffc XML 2 06-07-2004 03:20 PM



Advertisments