A few points:

1) '//' is very ineffecient, if you can avoid using it.

2) The last step is 'variables' so you're selecting the single
   <variables> node not the <variable> nodes.  Though, you
   should have gotten at least size() == 1 in that case.

3) Try /jobTicket/cdg/variables/variable

        -bob

On Wed, 20 Nov 2002, Paul Tomsic wrote:

> I'm having trouble digging out what appears to be
> obvious informatino from my XML file, using the
> following code:
> 
> XPath xpath = new JDOMXPath("//cdg/variables");
> List variables = xpath.selectNodes(doc);
> 
> my list is always size() == 0.  What I'm looking for
> is all of the "variable" elements.
> Is my xpath incorrect?
> 
> my xml:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <jobTicket url="http://localhost/cdg";>
>  <order id="123456" date="20/11/2002">
>   <userInfo username="thisUser"/>
>  </order>
>  <cdg>
>   <template uri="/usr/local/template.txt"/>
>   <variables>
>    <variable varName="one"/>
>    <variable varName="two"/>
>   </variables>
>  </cdg>
> </jobTicket>
> 
> ---
> 
> thanks in advance.
> Paul
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: To learn the basics of securing 
> your web site with SSL, click here to get a FREE TRIAL of a Thawte 
> Server Certificate: http://www.gothawte.com/rd524.html
> _______________________________________________
> Jaxen-interest mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jaxen-interest
> 

--
Bob McWhirter        [EMAIL PROTECTED]
The Werken Company   http://werken.com/



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to