473,324 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

make a join in LINQ

Hi,
I am trying to work with XML that looks like this;
Expand|Select|Wrap|Line Numbers
  1.  <?xml version="1.0" encoding="UTF-8" ?> 
  2.  <Batch>
  3.  <Page>
  4.  <Field>
  5.   <Name>Manifest</Name> 
  6.   <Value>200520000</Value> 
  7.   </Field>
  8.  <Field>
  9.   <Name>File Name</Name> 
  10.   <Value>C:\ScanningDemo\Manifest\PDFOutput\200520.pdf</Value> 
  11.   </Field>
  12.   </Page>
  13.  <Page>
  14.  <Field>
  15.   <Name>Manifest</Name> 
  16.   <Value>200519</Value> 
  17.   </Field>
  18.  <Field>
  19.   <Name>File Name</Name> 
  20.   <Value>C:\ScanningDemo\Manifest\PDFOutput\200519.pdf</Value> 
  21.   </Field>
  22.   </Page>
  23.  <Page>
  24.  
I am trying to get Value()0 and value(1). I am using the following linq to do that
Expand|Select|Wrap|Line Numbers
  1.         Dim manifest = From m In file...<Field> _
  2.                Where m...<Name>.Value.ToLower = "manifest" _
  3.                Select m...<Name>.Value, m...<Value>.Value
  4.  
  5.         Dim address = From f In file...<Field> _
  6.                       Where f...<Name>.Value.ToLower = "file name" _
  7.                       Select f...<Name>.Value, f...<Value>.Value
  8.  
It works great, but is there a way to create an object that would have 3 properties, i.e. Name = Manifest, Value=manifest#, address=filename

Thanks for your help
Dec 13 '08 #1
0 973

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: shapper | last post by:
Hello, I have 2 tables: Aid, Aname ... Bid, Aid, Bname ... I need to get the records in B given a Bname and a Aname. I think I should use Inner Join. I wrote the following code:
0
by: john | last post by:
I get the following error on this Join Statement, but I thought the idea of a LINQ Join is bring together different Data Context, the Intellisene shows me both tables as a Result; any help is...
1
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have a DataSet with 2 tables. Now I want to select data like a INNER JOIN from these tables. In SQL Syntax I would write: SELECT * FROM table1 t1 INNER JOIN table2 t2 ON t1.f1 =...
4
by: shapper | last post by:
Hello, I have a list named Form which is a List(Of Tag) where Tag is an object with two properties: ID and Name. I want to define a variable named Check that: 1. Is True if all Tags in Form...
0
by: shapper | last post by:
Hello, I have three tables: Posts, Tags and PostsTags which relates Tags to Posts. I created the dbml file. I have a List(Of Tag) named "form" with the Name defined for each tag. I need to...
1
by: Gilbert Tordeur | last post by:
Bonjour, Contexte : VB2008, SQL Server 2000. Je souhaite effectuer un JOIN entre deux tables SQL stockées sur des serveurs différents. Comment faire avec LINQ ? Merci d'avance, Gilbert
0
by: Jay Douglas | last post by:
Hello, I've found some posts on creating dynamic WHERE clauses in LINQ to SQL using predicate builders and extending lamda expressions. One issue with these posts is all the examples only use a...
2
by: Michel Walsh | last post by:
Is it possible to directly update over a join (by that, I mean without using an explicit UPDATE SQL statement) over a join, in LINQ, when no relation exists between the two tables? ...
5
by: shapper | last post by:
Hello, I have a List<Role>, Roles, where Role has two properties: Type and Description. Then I have: string MyRoles. I need to define a CSV list created by all Desciptions of the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.