Edwin, Thanks very much for your response.
The XML is already as you stated it needed to be (i.e. it uses '<' rather than '<'). Since the XPath expression is not part of an XML document (e.g. an XSL Stylesheet), I don't believe that it needs to be escaped in the String that is the parameter to the XPath constructor. In fact, it does not work if it is escaped. I did make the change to the program to include the first xqx:expr prior to the '*' and the program runs successfully. Thanks for that advice. However, I have a follow-up question. Why is the first xqx:expr needed in the XPath expression? Shouldn't the '*' match the first xqx:expr and its descendents? I am very confused by this. Doesn't this seem like a bug in DOM4J's XPath expression evaluation? Regards, Dave --- Edwin Dankert <[EMAIL PROTECTED]> wrote: > I can see one problem with your XML and another > problem > with your XPath. > > The problem with your XML is caused by the '<' > character > used as XML content. > > > <xqx:opType><=</xqx:opType> > > This is not well-formed XML, it should be: > > <xqx:opType><=</xqx:opType> > > Did this throw an exception? > > The XPath is wrong because, it does first of all not > specify > the element you want, (you forgot to include the > first xqx:expr > element) and secondly you will have to include the > XML > content change above in the XPath. > > > /rr:ReportRequest/xqx:whereClause/*/xqx:expr > > [EMAIL PROTECTED]:type = 'operatorExpr' > > and xqx:opType = '<=' > > and xqx:parameters/xqx:expr[1]/xqx:value = > 'DateMisplaced'] > > /xqx:parameters/xqx:expr[2]/xqx:value > > So your XPath should be: > > /rr:ReportRequest/xqx:whereClause/xqx:expr/*/xqx:expr > [EMAIL PROTECTED]:type = 'operatorExpr' and xqx:opType = '<=' > > and xqx:parameters/xqx:expr[1]/xqx:value = > DateMisplaced'] > /xqx:parameters/xqx:expr[2]/xqx:value > > Regards, > Edwin > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- > Interactive Reporting > Tool for open source databases. Create drag-&-drop > reports. Save time > by over 75%! Publish reports on the web. Export to > DOC, XLS, RTF, etc. > Download a FREE copy at > http://www.intelliview.com/go/osdn_nl > _______________________________________________ > dom4j-user mailing list > dom4j-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dom4j-user > __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user