[jdom-interest] getting ,Invalid XPath expression after Using JDOM1 ..???

Vikas Mane vikas at kenati.com
Tue Mar 8 03:01:40 PST 2005


Hi 
ThanQ michael for immediate reply :- )
I got ur point ... but what i wonder is , how it works with the older
version of jdom and jaxen jars.

The o/p expected from xpath is getting all matching NPModule Elements at
any level. 

".//NPModule" works for me ..but still i don't understand reason for the
failure of xpath which works with older jar files.

Thanks 
Vik at s 


On Tue, 2005-03-08 at 15:28, Michael Kay wrote:

> That's not a valid XPath expression. "child::" must be followed by a
> NodeTest. I can't suggest a correction because I've no idea what the
> writer of this expression thought it might mean. Perhaps just
> child::NPModule  - people often seem to throw in a "//" as magic
> pixie-dust when they don't know what they're doing.
>  
> Michael Kay
> http://www.saxonica.com/
> 
>         
>         ______________________________________________________________
>         From: jdom-interest-bounces at jdom.org
>         [mailto:jdom-interest-bounces at jdom.org] On Behalf Of Vikas
>         Mane
>         Sent: 08 March 2005 08:51
>         To: jdom-interest at jdom.org
>         Subject: [jdom-interest] getting ,Invalid XPath expression
>         after Using JDOM1 ..???
>         
>         
>         hi all ,
>         
>         i have upgraded to JDOM1 but the xpath which used to run
>         properly is giving exceptions after upgrading to JDOM1
>         
>         this is the xpath i'm using ..
>         
>         "child:://NPModule [ @name='test' and @parent = 'test1']
>         
>         I get following exception
>         org.jdom.JDOMException: Invalid XPath expression:
>         "child:://NPModule [ @name='config' and @parent = 'kcli']":
>         Expected <QName> or *
>         
>         What is the reason?
>         
>         can any buddy suggest/reason solution for the same ?
>         
>         Thanks
>         Vikas
>         
>         
>         > -- 
>         > Vikas Mane
>         > Kenati Technologies 

-- 
Vikas Mane <vikas at kenati.com>
Kenati Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050308/59d04a59/attachment.htm


More information about the jdom-interest mailing list