While looking into switching to VTD-XML from Xerces, I've stumbled on a predicate issue involving ampersand and CDATA. If I have the following XML:
<?xml version="1.0" encoding="utf-8"?>
<phrase><![CDATA[This & That]]></phrase>
And I run this XPath:
/test/nodeA[./phrase='This & That']/@key
With Xerces, I get the key attribute value 'thisthat'. With VTD-XML, I get an empty string.
So far I haven't had any issues reading the CDATA directly, or referencing it in a predicate if there are no ampersands. Also tried removing the CDATA and left the
). Seemed to work fine for both Xerces and VTD-XML.
However, when there's and ampersand in the CDATA, and it's referenced in an XPath predicate, VTD-XML doesn't seem to like it. Thoughts?
sorry about late reply, will look into it and get back
this problem has been confirmed and fixed, you can check out from CVS or wait for next release