<DIV>Now I am really confused. I tried my two XPath expressions using JDOM XPath (Saxen) and discovered that 'B&O' finds the node I am looking for and 'B&amp;O' does not. Does anyone know whether the the JDOM implementation or the NeoCore XMS implementation is working correctly?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Steve<BR><BR><B><I>Steve Condas <scondas@yahoo.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<DIV>I am having some XPath trouble and I can't seem to find good answers after searching the internet, so I am hoping that someone here has a good idea. I have a document that looks like:</DIV>
<DIV> </DIV>
<DIV><Test></DIV>
<DIV> <Railroad></DIV>
<DIV> <Name>B&amp;O</Name></DIV>
<DIV> </Railroad></DIV>
<DIV>
<DIV> <Railroad></DIV>
<DIV> <Name>Reading</Name></DIV>
<DIV> </Railroad></DIV></DIV>
<DIV><Test></DIV>
<DIV> </DIV>
<DIV>My UI wants to find B&O railraod. Naively I did the following XPath:</DIV>
<DIV> </DIV>
<DIV>/Test/Railroad[Name='B&O']</DIV>
<DIV> </DIV>
<DIV>But this didn't work agains my XML database (NeoCore XMS). I then changed the XPath to</DIV>
<DIV> </DIV>
<DIV>
<DIV>/Test/Railroad[Name='B&amp;O']</DIV>
<DIV> </DIV>
<DIV>and it worked. This leads to two questions:</DIV>
<DIV> </DIV>
<DIV>1) Do the specs say I have to expand entity references in my XPath query?</DIV>
<DIV>2) Is there any way I can use JDOM or JDOM XPath to do the expansion for me, kind of in the spirit that Element.setText() and XMLOutputter expand them for me?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance,</DIV>
<DIV>Steve</DIV></DIV>_______________________________________________<BR>To control your jdom-interest membership:<BR>http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</BLOCKQUOTE>