1
<ResponseOfArrayOfQuestions>
  <Result>
    <Questions>
        <DESCRIPTION>Ask me?</DESCRIPTION>
        <DIFFICULTY>1</DIFFICULTY>
        <ID>1</ID>
        <LK_recordstatusid>True</LK_recordstatusid>
        <oAnswers>
            <Answers>
                <DESCRIPTION>me</DESCRIPTION>
                <ID>1</ID>
                <ISCORRECT>False</ISCORRECT>
            </Answers>
            <Answers>
                <DESCRIPTION>you</DESCRIPTION>
                <ID>2</ID>
                <ISCORRECT>False</ISCORRECT>
            </Answers>
            <Answers>
                <DESCRIPTION>Everyone</DESCRIPTION>
                <ID>3</ID>
                <ISCORRECT>False</ISCORRECT>
            </Answers>
            <Answers>
                <DESCRIPTION>NoOne</DESCRIPTION>
                <ID>4</ID>
                <ISCORRECT>True</ISCORRECT>
            </Answers>
        </oAnswers>
    </Questions>
    <Questions>
    </Questions>
    .
    .
    .
  </Result>
  <Status>SUCCESS</Status>
  <StatusCode>200</StatusCode>
</ResponseOfArrayOfQuestions>

Can anyone please help me parse this so so confusing XML which I have been trying for over days? :( Thanks.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
Soe Htike
  • 61
  • 2
  • 4
  • 1
    What exactly are you trying to extract from this XML? Are you creating classes to represent each answer? – ColinE Jun 15 '11 at 13:07

1 Answers1

0

You can use LINQ.

Here are links to Stackoverflow Q&A of its usage:

Windows Phone 7 and System.Xml.Linq library

LINQ to read XML

Community
  • 1
  • 1
Ozair Kafray
  • 13,351
  • 8
  • 59
  • 84
  • Yup, I have gone through all of them. The problem is I am getting null. I am not sure which part I should use as Elements and which part I should use as Descendants.. :S – Soe Htike Jun 15 '11 at 12:04
  • 4
    Ok, then please edit your question add the exact error details in it. – Ozair Kafray Jun 15 '11 at 12:07