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

Help Linq to XML How to MoveFirst, Move Next, Move Previous, MoveLast

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
2 3129
edcha wrote:
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
Is that some sort of homework assignment or why can't you use foreach or
while?
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 3 '08 #2
this is not a homework

only I need a 4 control btnMoveFrst etc. to move in every node

Thamks.

Nov 3 '08 #3

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

Similar topics

9
by: tym | last post by:
HELP!!! I'm going round the twist with this... I have a VB6 application which is using DAO to access a database (Please - no lectures on ADO, I know what I'm doing with DAO!!) Ok, problem...
0
by: AR Hall | last post by:
This code goes through 3 work sheets in the same XL workbook, day, eve and night shift in each sheet their are columns representing production work orders and reject and downtime for each order...
8
by: Henrik Larsson | last post by:
Hi, I need help with selecting the following rows from a table looking like this: ID IP Query 1 -> 1 2.2.2.2 (ie first IP 1 1.1.1.1 <- Query 2 for each...
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...
2
by: jodyblau | last post by:
I'm not certain that what I am trying to do is possible; in any event I haven't been able to figure it out. Here is what I am trying to do: I have one table that has a list of cases I'm working...
3
by: congngo | last post by:
Hi all My code is working fine. I just need help with looping the rst.move Dim rst As Recordset Dim varCXL1, varCXL2, varclx3, varCXL4, varCXL5 As Integer Set rst =...
4
by: chaekung | last post by:
I have problem when open the record set as below code : Private Sub Text4_LostFocus() Dim dbs As Database Dim rs As Recordset Dim sql As String On Error Resume Next Set dbs = CurrentDb() sql...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.