Hi

I'm having a problem matching the text of elements that contain ampersands
from within dom4j.

My xml is as follows:

<categories>
  <category>A B &amp; C</category>
  <category>D E F</category>
</categories>

This xpath expression selects the second category element as expected:

    String xpathExpression = "/categories/category[text()='D E F']";


This xpath expression fails to select the first category element or any
element.

    String xpathExpression = "/categories/category[text()='A B & C']";

Running the same expression in xpath
explorer(http://www.purpletech.com/xpe/index.jsp), it works fine

Any thoughts on why this happens would be much appreciated.

regards
Nigel






-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to