Having some trouble parsing this bit of XML. Can you help?

  • Thread starter Thread starter Anthony P.
  • Start date Start date
A

Anthony P.

I've not used XML a whole lot and it's driving me nuts. I've learned
how to parse simple XML like this:

<Response>
<name>Anthony Papillion</name>
<email>[email protected]</name>
</Response>

I can parse this using the xmlTextReader and it's pretty easy. But I'm
faced with a bit more complex XML and I have no idea how to handle it.
Here is a snippet:

<Response>
<Messages>
<Message>
<sender>Anthony Papillion</sender>
<subject>Just a Test</subject>
<date>July 15, 2010</date>
</Message>
<Message>
<sender>John Doe</sender>
<subject>Another Test</subject>
<date>July 15, 2010</date>
</Message>
</Messages>
</Response>

Now, as you can see, it's not particularly complex, but I don't know
how to parse the multiple <message> nodes that are children of
<messages>.

Can anyone help?

Thanks!
Anthony
 
Back
Top