Hi,
Doesn't sound like a bug to me.

Question ar you attempting to select nodes?
If so then you need to currect your expression
If not then you should not be calling selectNodes()

Mike

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of robert
> Sent: Monday 26 July 2004 21:47
> To: [EMAIL PROTECTED]
> Subject: [dom4j-user] result of XPath expression is not a Node
> 
> 
> Hello,
> 
> I'm confused about org.dom4j.Node's method 
> selectSingleNode(String) - it's
> supposed to return a Node.  What happens when the XPath 
> expression doesn't
> find anything is not documented, but I'd assume that it would 
> return null. 
> Instead, it throws an exception - the message in the 
> exception suggests you
> try another method such as selectObject() to evaluate the 
> results of the
> expression:
> 
> org.dom4j.XPathException: Exception occurred evaluting XPath: 
> The result of
> the XPath expression is not a Node. It was: true of type: 
> java.lang.Boolean.
> You might want to use a different method such as 
> selectObject() to evaluate
> this XPath expression
>         at 
> org.dom4j.xpath.DefaultXPath.selectSingleNode(DefaultXPath.java:163)
>         at 
> org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:188)
>         at [... etc]
> 
> I can use selectObject() or some other method to try to get 
> to the nodes I'm
> interested in, but the behavior kind of bites.  Is this a bug?
> 
> Cheers,
> 
> - R
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
> 




-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to