I have this xml:
<Customers>
<CustomerDetail>
<CustomerFormofPayment Amount="200.00" Code="USD">
<Billing>
<Address>
<FirstName>Test1</FirstName>
<LastName>Test2</LastName>
</Address>
<TID>1234568</TID>
</Billing>
</CustomerFormofPayment>
</CustomerDetail>
<CustomerInfo>
<Name>
<GivenName>test</GivenName>
<MiddleName></MiddleName>
<Surname>testing</Surname>
</Name>
<Address>
<AddressLine>222 Elm Street</AddressLine>
<AddressLine></AddressLine>
<CityName>Anycity</CityName>
<StateProv>XX</StateProv>
<CountryName>US</CountryName>
</Address>
<Telephone PhoneNumber="111-222-3333"></Telephone>
<Email>[email protected]</Email>
</CustomerInfo>
</Customers>
I used the xsd from this xml to generate a class. I am trying to
query the generated class
using LINQ to create an object. My problem is that the element
<CustomerDetail> has two other choices that could have been selected.
Now the tag <Item> is generated in the class. Is there a way I can
select all the elements with this class and then create a query using
LINQ to generated an object?