Need a Code Example of XML in C#

Discussion in 'XML' started by redlightpacket@wmconnect.com, Dec 17, 2006.

  1. Guest

    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>
    , Dec 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cehon
    Replies:
    1
    Views:
    2,392
  2. Replies:
    0
    Views:
    412
  3. moty

    Help - Need code example

    moty, Jan 24, 2007, in forum: C Programming
    Replies:
    1
    Views:
    308
    santosh
    Jan 24, 2007
  4. Igor
    Replies:
    1
    Views:
    148
    Victor Garcia Aprea [MVP]
    Jul 15, 2003
  5. Sam Roberts
    Replies:
    15
    Views:
    286
    Sam Roberts
    Feb 7, 2005
Loading...

Share This Page