[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: getting multiple values

Subject: RE: getting multiple values
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 06 Sep 2001 12:50:18 +0200
nextnode .text
P Vikram <vikram_good_boy@xxxxxxxxx> wrote:
> Can anybody help.iam getting alternate values.Iam
> getting 2,4,6.

That's the expected behaviour of your code.
[...]
> idarray = new Array();		 		 
> var j =0;
> while (testvar.nextNode()){
>  alert(testvar.nextNode().text);
> }
Stap by step:
  while( testvar.nextNode() ) 
gets the node <ID>1</ID> from the tree
  alert(testvar.nextNode().text);
will show the text of the next node, which is <ID>2</ID>
The loop starts over, and
  while( testvar.nextNode() ) 
gets again the next node, which is <ID>3</ID>, and so on.

Some hints to reduce the potential annoyance you might cause
to other members of this list.
1. Learn to avoid posting the same stuff multiple times.
2. Learn to trim down unnecessary quotes, especially at the
   end of your answer (well, there are worse offenders than
   you...)
3. Learn to spell and to format texts properly.
4. Learn to control your mail client in order to format
   embedded code and examples properly.
5. Get manuals and text books about the tools and lanugages
   you are using. Learn to read them.
6. Learn to read and adhere to list charters.
7. If all else fails, take an off-line course in programming,
   you'd be much happier afterwards (or looking for another
   job...)

HTH
J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.