commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Benn" <>
Subject Calling a method with JXPath
Date Sat, 03 Mar 2007 19:20:05 GMT


            I have a a strane problem when I’m trying to call a method with
JXPath.  The object graph has a user which has a method called
getQuestion(String pstrQuestionID).  The JXPath I have written for this is:



            The dot at the front is notation to allow me to access the first
element, the root of the context is a list.  However when I attempt to run
this I get the following stack trace : 


org.apache.commons.jxpath.JXPathException: Invalid XPath:
'.[1]/getQuestion(\'lastname\')'. Syntax error after: '.[1]/g'

            However as far as I can see, the XPath notation is valid – I would
be most grateful is someone could let me know what I’ve done wrong.


            Thanks, in advance for your help.







Neil Benn Msc

CEO Ziath Ltd

Website -

Blog -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message