commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dmi...@apache.org>
Subject [jxpath] DynaBean support
Date Sun, 20 Oct 2002 04:30:04 GMT
JXPath now supports DynaBeans.  There is no run-time dependency, so if you
don't have commons-beanutils.jar on your class path, you don't need to add
it to continue working JXPath.

Please find the new build at

http://www.plotnix.com/jxpath/commons-jxpath.zip

Another change is a massive overhaul of the test cases.  They now look the
way JUnit test cases are supposed to, are more modular and thus
maintainable.

One more change that may affect some people is in the behavior of setValue()
for DOM/JDOM structures.

The new implementation replaces all contents of the element, not just text
nodes as it used to.

The XPath specification requires the conversion from an Element to a string
to take all descendent text nodes and concatenates their values.  That's how
getValue(path) is implemented.

The old implementation of setValue() would replace immediate children that
are text nodes, but leave the rest of the element children intact.
Therefore if you called setValue(path, "foo") and then getValue(path), you
would not necessarily get "foo".

The new implementation fixes this problem.

Remember, you can always get/set the contents of an individual text node by
using the "element/text()" syntax.

I hope this does not cause serious problems for anybody.

- Dmitri


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message