[jdom-interest] XPath selectSingleNode returns Boolean problem

Jason Hunter jhunter at servlets.com
Wed Feb 4 18:12:11 PST 2004


I never saw a response on this.  Laurent, what was your original plan 
for handling things like this?

-jh-

Steven Shand wrote:

> The javadocs state that XPath.selectSingleNode can return node types 
> only (Element ,Attribute ,Text ,CDATA ,Comment or ProcessingInstruction)
> 
> However the code below return a Boolean.
> 
> String expression = "descendant-or-self::text() != ''"
> XPath xpath = XPath.newInstance( expression );
> Object match = xpath.selectSingleNode( element );
> 
> I guess this is a bug or am I missing something obvious?
> 
> Ironically, this behavior is just what I want!
> 
> Steven Shand
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com 
> 
> 



More information about the jdom-interest mailing list