Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > LINQ
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
LINQ Discuss Microsoft's LINQ (Language INtegrated Query) for .NET 3.0 and later.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the LINQ section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 26th, 2010, 02:31 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default Start processing a xml document from a particular node number.

Hello everyone,
there is a xml file in the following format:
Code:
<Employees>
<Employee>
<Name>Abc</Name>
<Designation>D1</Designation>
</Employee>
<Employee>
<Name>Def</Name>
<Designation>D2</Designation>
</Employee>
....
</Employees>
In the source xml the <Employee> tag might have the same name and same designation meaning an employee can be repeated in the source xml.
The application reads this xml and process each node. The source xml file and the current tag position are written to a text file (sort of maintaining a checkpoint). For some reason, if the application crashes or is closed (this is a command line application), the next time when the applicaiton is started, it will check of the checkpoint file, look for the node number and starts processing from that node (sort of resume).
Currently this is done using the normal Xml classes of dotnet and the standard for loop, with the variable i initialized to the node count from the text file.
Is there a way to use the above logic, to start processing from a particular node if we know the node number, using LINQ.

Any help is grealty appreciated.

Regards.

PS: I have not posted any code snippet as its very generic xml processing code.
  #2 (permalink)  
Old March 18th, 2010, 05:59 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hello everyone,
this is very trivial when I found it, should have done some lookup before posting.
Using the Skip method will allow to skip the nodes and start from the next node.

Any thanks for all the views.

Regards.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a node to an existing xml node list. codehelp C# 2008 aka C# 3.0 2 October 12th, 2009 07:41 AM
Adding a new Node to existing XML document Lupus81 XML 3 August 4th, 2009 04:57 PM
How to insert a New node into the XML Document VB jabrouni1 Classic ASP XML 1 January 26th, 2007 06:11 AM
Node Processing adamflynn XSLT 6 September 7th, 2006 05:42 AM
Processing first node in a sequence djmarquette XSLT 3 November 15th, 2005 01:05 PM



All times are GMT -4. The time now is 06:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.