Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with LINQ join

Status
Not open for further replies.

KirillToronto

Programmer
Jul 8, 2008
24
CA
I have the following xml file, I am trying to get a LINQ to have Filename and Manifest # in one collection. I have made 2 queries that work fine (see bewlow), but how do I make one query for this messed up XML.

Thanks for any help

Dim file As XElement = XElement.Load("C:\manifest\manifest.xml")

Dim manifest = From m In file...<Field> _
Where m...<Name>.Value.ToLower = "manifest" _
Select m...<Name>.Value, m...<Value>.Value


Dim address = From f In file...<Field> _
Where f...<Name>.Value.ToLower = "file name" _
Select f...<Name>.Value, f...<Value>.Value






<Page>
<Field>
<Name>Manifest</Name>
<Value>200520</Value>
</Field>
<Field>
<Name>File Name</Name>
<value>C:\200520.pdf</Value>
</Field>
</Page>
<Page>
<Field>
<Name>Manifest</Name>
<Value>200519</Value>
</Field>
<Field>
<Name>File Name</Name>
<Value>C:\200519.pdf</Value>
</Field>
</Page>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top