Solved

Xml help needed

Posted on 2004-10-06
3
117 Views
Last Modified: 2013-12-24
Hi,

I wanted to ask.. if I have an xml file..

And the file has say 1 root (of course) and maybe 10 child elements/nodes.

I want to output the first child elements values (XmlText)  if the user clicks a button.

So on an html form, I want to hit submit and display the first nodes value

The next time I hit submit, I want to display the next nodes values

Sort of like in a line, you come to our site, hit a button and you get the values only in node 1

Next person comes to site, hits same button, they get the values from node 2, etc, etc

Each node has unique values so two users will never get the same values if done correctly.

How can this be done?

In a sense if you were to compare my example to a normal database...  Its like hitting a button and getting the first record in the db, hitting it again, you get the 2nd record in db, etc

Hope that makes sense....

0
Comment
Question by:Westside2004
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 400 total points
ID: 12246090
#xmlDoc.xmlRoot.xmlChildren[ 1 ].xmlText#
#xmlDoc.xmlRoot.xmlChildren[ 2 ].xmlText#
#xmlDoc.xmlRoot.xmlChildren[ 3 ].xmlText#
etc.

is that it?
0
 
LVL 1

Author Comment

by:Westside2004
ID: 12256376
HI,

I ended up getting the solution, the solution was more related to the read, parsing, and writing back to the xml file...

But involved looping, and using XmlElemNew to create new elements.

Thanks

-ws
0
 
LVL 17

Expert Comment

by:Tacobell777
ID: 12256588
can you post the solution
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now