i'm dramatically confused with reading XML...I feel in way over my head.
currently, using the XML below as an input source, i'm able to get all of the names by using
XmlNodeList name = xDoc.GetElementsByTagName("Name");
int i;
for (i=0; i < sent.Count; i++)
{
MessageBox.Show(name[i].InnerText);
}
When I try to do the same for id, however, it also returns line 2 "someID".
I basically need to just rip all of the InsuredListMember and save them, any suggestions? i've been staring at xpath tutorials for a good week now and they make absolutely zero sense is why i fell back on getelementsbytagname
XML:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>someID</id>
<title type="text">Title</title>
<author>
<name>XML Author</name>
</author>
<updated>2010-10-25T20:05:30.267Z</updated>
<link href="currentURL"></link>
<link href="nextURL"></link>
<entry>
<id>Drivers License Number</id>
<content type="application/vnd.ctct+xml">
<InsuredListMember xmlns="http://strange.com/ns/1.0/" id="drivers license number">
<HomeAddress>123 anystreet</HomeAddress>
<Name>doe, somegal</Name>
</InsuredListMember>
</content>
</entry>
<entry>
<id>Drivers License Number</id>
<content type="application/vnd.ctct+xml">
<InsuredListMember xmlns="http://strange.com/ns/1.0/" id="drivers license number">
<HomeAddress>321 anystreet</HomeAddress>
<Name>doe, someguy</Name>
</InsuredListMember>
</content>
</entry>
</feed>