[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: getting multiple values
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|