[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: P Vikram <vikram_good_boy@xxxxxxxxx>
Date: Wed, 5 Sep 2001 17:30:44 -0700 (PDT)
selectsinglenode multiple
Hi

Can anybody help.iam getting alternate values.Iam
getting 2,4,6.

testvar = testXML.documentElement.selectNodes("ID");
		
		idarray = new Array();		
					var j =0;
		while (testvar.nextNode()){
			alert(testvar.nextNode().text);
			
		}

<XML id="testXML">
 
	
<DATA>
<ID>1</ID>
<ID>2</ID>
<ID>3</ID>
<ID>4</ID>
<ID>5</ID>
<ID>6</ID>
<ID>7</ID>

</DATA>

</XML>
--- "Sullivan, Dan" <dsullivan@xxxxxxxxxxx> wrote:
> use selectNodes. What you are seeing is expected
> behaviour for
> selectSingleNode, it returns the first node of all
> that matched the
> XPath expression.
> 
> Dan
> 
> -----Original Message-----
> From: P Vikram [mailto:vikram_good_boy@xxxxxxxxx]
> Sent: Wednesday, September 05, 2001 7:58 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  getting multiple values
> 
> 
> 
> 
> 
> 
> Hi all
> 
>
testXML.documentElement.selectSingleNode("//ID").text)
> 
> returns me 1.
> 
> How to get all the values.
> 
> Thanks
> 
> 
> <XML id="testXML">
>  
> 	
> <DATA>
> <ID>1</ID>
> <ID>2</ID>
> <ID>3</ID>
> <ID>4</ID>
> <ID>5</ID>
> <ID>6</ID>
> <ID>7</ID>
> </DATA>
> 
> </XML>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- P Vikram <vikram_good_boy@xxxxxxxxx> wrote:
> > Hi
> > 
> > i did all these...but still iam not getting the
> > value
> > in textbox.funny thing s iam getting the value in
> > the
> > alert if i use selectsinglenode method.
> > 
> > any ideas??/
> > 
> > Thanks
> > --- Chris Bayes <chris@xxxxxxxxxxx> wrote:
> > > Still!
> > > If you remove all the bugs you get 
> > > <html>
> > > <head>
> > > <script language="javascript">
> > > function test() {
> > > 	var xsl = new
> ActiveXObject("microsoft.xmldom");
> > > 	xsl.async = false;
> > > 	xsl.load("v.xsl");
> > > 	var optHTML =
> > > testXML.XMLDocument.transformNode(xsl);
> > > 	document.all("test").innerHTML = optHTML;
> > > }
> > > </script>	
> > > </head>
> > > <body onload="test()">
> > > <XML id="testXML">
> > > <TESTDATA>
> > > <DETAILS>
> > > <TABLE>
> > > <TEST>iwantthisvalue</TEST>
> > > </TABLE>
> > > </DETAILS>
> > > </TESTDATA>
> > > </XML>
> > > <div id="test">
> > > </div>
> > > </body>
> > > </html>
> > > Produces
> > > <?xml version="1.0" encoding="UTF-16"?><INPUT
> > > maxLength="7" name="test"
> > > size="14" value="iwantthisvalue" />"
> > > As for the stylesheet you should remove all the
> > "//"
> > > you have scattered
> > > around
> > > 
> > > Ciao Chris
> > > 
> > > XML/XSL Portal
> > > http://www.bayes.co.uk/xml
> > > 
> > > 
> > >  XSL-List info and archive: 
> > > http://www.mulberrytech.com/xsl/xsl-list
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get email alerts & NEW webcam video instant
> > messaging with Yahoo! Messenger
> > http://im.yahoo.com
> > 
> >  XSL-List info and archive: 
> > http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant
> messaging with Yahoo!
> Messenger
> http://im.yahoo.com
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

 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.