473,395 Members | 1,676 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,395 software developers and data experts.

How to MoveFirst, MoveNext, MovePrevious, MoveLast in LinQ To XMlPlease Help

I have the Next XML

var xml = new XElement( "clients",
new XElement("client",
new XAttribute("id",1),
new XElement( "name", "Luis"),
new XElement( "country",
"Portugal")
),
new XElement("client",
new XAttribute("id",2),
new XElement( "name", "John"),
new XElement( "country",
"England")
),
new XElement("client",
new XAttribute("id",3),
new XElement( "name", "Edwin"),
new XElement( "country", "Costa
Rica")
),
new XElement("client",
new XAttribute("id",4),
new XElement( "name",
"Paulo"),
new XElement( "country",
"Portugal")
)

);

And I nedd one code to move between nodes but Without use Foreach or
While, Only I Can do next.

var firstClient = xml.Element("client");
Debug.WriteLine(firstClient);
var ancestor = firstClient.NextNode;
Debug.WriteLine(ancestor);

But with this don`t move more than "id",2 Please Help
Thanks

Edcha
Nov 3 '08 #1
0 1775

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marcin Zmyslowski | last post by:
Hello! I use data.read and data.getValue(Id_column) to get the value of specified column. Unfortunately there are some differences between VBScript and Visual Basic (MS Access) and I cannot move...
5
by: tony010409020622 | last post by:
I just spent 4 months taking a dotnet class where i learned very little. One of the things I did not learn is this: What are the dotnet equivilents of commands such as: Adodc1.Recordset.AddNew...
3
by: Duncan | last post by:
Hi, I have been passed a class to work with, but am having some problems. I do not know the origin of the code, and am having problems with some functionality. The VB class implements...
3
by: MLH | last post by:
The error occurred in line #5130. Ideas as to why? qryITSLetterList returns 1 single record - but I don't think that should be a problem. Hmmm??? 5100 Dim MyDB As Database, rstITSLttrs As...
7
by: MLH | last post by:
Here's a blurb cut from A97 HELP on BOF/EOF: When you open a Recordset object that contains at least one record, the first record is the current record and the BOF and EOF properties are False;...
1
by: klaydze | last post by:
i have here my lines of codes. how can i use the RECORDSET.MOVELAST in VB.NET. because i need to use the rs.movelast so that my pointer will go to the last record in my database. this line of code...
4
by: MLH | last post by:
160 Dim DB As Database, Rst As Recordset, QD As QueryDef 170 Set DB = CurrentDb() 180 Set QD = DB.CreateQueryDef("", MySQL) 190 Set Rst = QD.OpenRecordset(dbOpenDynaset) HOW TO COUNT RECORDS IN...
0
by: edcha | last post by:
I have the Next XML var xml = new XElement( "clients", new XElement("client", new XAttribute("id",1), new XElement( "name", "Luis"), new XElement( "country", "Portugal") ), new...
2
by: edcha | last post by:
I have the Next XML var xml = new XElement( "clients", new XElement("client", new XAttribute("id",1), new XElement( "name", "Luis"), new XElement( "country", "Portugal") ), new...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.