I just ran a quick test and noticed the same thing. I'm not involved with [jxpath], but this may be a bug. I would wait for a response from one of the team members for a few days, and then think about filing a bugzilla issue.

I took a quick glance at the code, and the object is question is org.apache.commons.jxpath.ri.model.dom.DomAttributePointer. Calling getNode() eventually get to the getImmediateNode() method, which either returns null or the attribute value. It has the attribute object stored internally, so an easy fix could be just to return the attrib itself instead of the value.

I could make this fix myself, but I want to wait for someone who knows the codebase a little better to comment.




joern turner wrote:


Hello,

can anybody explain why JXPath returns the value of an attribute instead of the attribute node when using JXPAth pointer.getNode() with a DOM object model?

this seems to be rather inconsistent with the behaviour when accessing an DOM element - here the DOM element is returned as expected. Is there a specific reasons why this is so? did i miss something?

Joern



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



Reply via email to