Hi,

I am using JXPath in combination with JAXB, and am finding it very
useful. I have a question relating to a XPath query which contains
predicates that specify attributes. 

e.g. [EMAIL PROTECTED]'1']/value

For the most part this works fine, but when the attribute has a name of
'name', as

e.g. [EMAIL PROTECTED]'xxx']/value

I always get null as a result. The JXPathContext javadoc contains the
following which does not make things any clearer to me, although I
suspect it may apply:

"JXPath does not support DOM attributes for non-DOM objects. Even though
XPaths like "[EMAIL PROTECTED]'warning']" are legitimate, they will always
produce empty results. The only attribute supported for JavaBeans is
"name". The XPath "foo/bar" is equivalent to "[EMAIL PROTECTED]'bar']". "

Is there some special handling for 'name'?

I am using JXPath 1.1b1. Attributes in JAXB are stored as normal
variables of the class, with corresponding get/set methods (getName(),
setName()).

Thanks for any clarification,

Craig



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to