JDOM has recently changed how they deal with text nodes, altering from
java.lang.String to org.jdom.Text.  You could have version mismatch
where Jaxen expects (and tests for) a Text object, where JDOM is
providing only Strings. 

Which version of JDOM are you using?

        -bob




On Fri, 22 Mar 2002, Tom Preston wrote:

> I tried doing as you suggested.  Here is what I have:
> 
> <ROOT>
>   <ROW number="1">
>     <FIRST_NAME>John</FIRST_NAME>
>     <LAST_NAME>Smith</LAST_NAME>
>     <CUSTOMER_NUMBER>27</CUSTOMER_NUMBER>
>   </ROW>
>   <ROW number="2">
>     <FIRST_NAME>Mary</FIRST_NAME>
>     <LAST_NAME>Jones</LAST_NAME>
>     <CUSTOMER_NUMBER>28</CUSTOMER_NUMBER>
>   </ROW>
> </ROOT>
> 
> When I ask for /ROOT/ROW/FIRST_NAME I get a list of Elements (as expected).
> Then I change this, as I think you are suggesting, to
> /ROOT/ROW/FIRST_NAME/text() .... but nothing is selected.  What am I missing
> here?
> 
> Thanks.
> 
> Tom
> 
> -----Original Message-----
> From: James Strachan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 19, 2002 11:28 AM
> To: Tom Preston
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Jaxen] using [@name] inside of JAXEN
> 
> 
> ----- Original Message -----
> From: "bob mcwhirter" <[EMAIL PROTECTED]>
> > > args[1] can be going after an Element or an Attribute if
> > > StringFunction.evaluate always just printed the value of Attr or
> > > Elements...Attributes work great (just returns obj.getValue()) but
> > > getElementStringValue doesn't print just the Element's getText() as I
> would
> > > like it to...I guess that I could just replace the JDOM
> DocumentNavigator
> > > with a custom one...
> >
> > It returns the XPath string-value of the element, which is recursive,
> > according to the spec.
> 
> Yes. The string-value of an element is recursive. If you don't want to be
> recursive with text inside elements you can use the text() function instead.
> 
> e.g.
> 
> //foo/bar/text()
> 
> would return a list of text nodes which are immediate children of <bar>
> elements but not any text inside child elements of <bar>s.
> 
> James
> 
> 
> 
> _______________________________________________
> Jaxen-interest mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jaxen-interest
> 


_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to