oceatoon wrote:

Hi everyone

I am having trouble retreiving an attribute in jexl.
In jxpath, I can retreive it like this #{./description/@maxoc}
but ${description.maxoc} doesn't work, can someone guide me please??



Jexl is a JavaBeans-oriented expression language. So you can't access attributes in an XML document using Jexl, except by using the DOM API (e.g. "${description.getAttribute("maxoc")}"). JXPath, on the contrary, traverses both DOM and JavaBeans hierarchies.


So in that particular case, using JXPath is the IMO the appropriate choice.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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



Reply via email to