Hmmm... so in that case, what if I have a document such as this:
<REQUEST_GROUP>
<REQUEST >
<REQUEST_DATA>
<FLOOD_REQUEST _ActionType="Original"
OriginalFloodDeterminationLoanIdentifier="00001238">
- <BORROWER _FirstName="Firstname1" _LastName="Lastname1" >
<_RESIDENCE _City="San Rafael" _County=""
_PostalCode="94903" _State="CA" _StreetAddress="1234 Sugarhill Drive" />
</BORROWER>
- <BORROWER _FirstName="Firstname2" _LastName="Lastname2">
<_RESIDENCE _City="Tustin" _County=""
_PostalCode="92780" _State="CA" _StreetAddress="5678 Tustin Ranch Rd."
_StreetAddress2="" />
</BORROWER>
</FLOOD_REQUEST >
<FLOOD_REQUEST _ActionType="Original"
OriginalFloodDeterminationLoanIdentifier="00001238">
- <BORROWER _FirstName="Firstname3" _LastName="Lastname3" >
<_RESIDENCE _City="San Rafael" _County=""
_PostalCode="94903" _State="CA" _StreetAddress="9012 Sugarhill Drive" />
</BORROWER>
- <BORROWER _FirstName="Firstname4" _LastName="Lastname4">
<_RESIDENCE _City="Tustin" _County=""
_PostalCode="92780" _State="CA" _StreetAddress="3456 Tustin Ranch Rd."
_StreetAddress2="" />
</BORROWER>
</FLOOD_REQUEST >
</REQUEST_DATA>
<REQUEST >
<REQUEST_GROUP>
The data from this example would need to be parsed into two flood
transactions, each with two co-borrowers and associated residences. However,
doing something like
XmlNodeList nodeList = xml.GetElementsByTagName("BORROWER") returns an array
of four, when I really want two for each request. Other than using the
XmlReader, I am not sure of the best way to do this.