<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2>Well, as usual, I'll answer my own question. 
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2>Seems&nbsp;that XPath can't handle namespace prefixes all 
by its lonesome. If you have an expression that has namespace prefixes, you have 
to indicate the namespaces in the XPath object. Like so:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XPath 
conditionXpath = XPath.newInstance("<FONT 
color=#000000>//ruleDef/ilog:conditions[1]/text<STRONG>()</STRONG></FONT>");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
conditionXpath.addNamespace("ilog", "<A 
href="http://www.myrules.com/">http://www.myrules.com</A>");<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=260261920-02092005><FONT face=Arial 
color=#0000ff size=2>-Kevin</DIV></FONT></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> jdom-interest-bounces@jdom.org 
[mailto:jdom-interest-bounces@jdom.org] <B>On Behalf Of </B>Kevin L. 
Cobb<BR><B>Sent:</B> Friday, September 02, 2005 2:05 PM<BR><B>To:</B> 
jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest] XPATH and 
namespace<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=417315817-02092005>Having trouble 
getting an XPATH expression with a namespace identifier to retreive the value in 
the XPATH. Example:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=417315817-02092005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=417315817-02092005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=417315817-02092005>&lt;ruleDef&nbsp; 
xmlns:ilog="<A 
href="http://www.myrules.com">http://www.myrules.com</A>"&gt;<BR>&nbsp;&nbsp; 
&lt;ilog:conditions conditionId="condID_590" 
ruleId="rule_590"&gt;3&lt;/ilog:conditions&gt;<BR>&nbsp;&lt;/ruleDef&gt;<BR></SPAN></FONT></DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial size=2>The XPATH expression 
"//ruleDef/ilog:conditions[1]/text<STRONG>()"</STRONG> does not return a result. 
I expect 3 to be the result. </FONT></SPAN></DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2>Kevin</FONT></SPAN></DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=417315817-02092005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<P style="MARGIN-BOTTOM: 0in"></P>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>