From user-return-24755-apmail-commons-user-archive=commons.apache.org@commons.apache.org Thu Jul 22 23:28:55 2010 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 49519 invoked from network); 22 Jul 2010 23:28:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Jul 2010 23:28:54 -0000 Received: (qmail 24240 invoked by uid 500); 22 Jul 2010 23:28:53 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 24131 invoked by uid 500); 22 Jul 2010 23:28:52 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 24123 invoked by uid 99); 22 Jul 2010 23:28:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jul 2010 23:28:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.66.139.15] (HELO tems6a.ironmountain.com) (208.66.139.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jul 2010 23:28:44 +0000 Received: from kcsmtp01.ironmountain.com (kcsmtp01.ironmountain.com [216.229.158.20]) (Using TLS) by tems6a.ironmountain.com; Thu, 22 Jul 2010 19:27:51 -0400 Received: from ([10.130.80.69]) by kcsmtp01.ironmountain.com with ESMTP with TLS id 6GMF5H1.123568717; Thu, 22 Jul 2010 18:27:47 -0500 Received: from MVMEXP01.tpt.imtn.com (10.146.10.23) by NUMEHTP02.na.imtn.com (10.130.80.69) with Microsoft SMTP Server (TLS) id 8.2.254.0; Thu, 22 Jul 2010 19:27:46 -0400 Received: from MVMEXP01.tpt.imtn.com ([::1]) by mvmexp01.tpt.imtn.com ([::1]) with mapi; Thu, 22 Jul 2010 16:27:45 -0700 From: "Mukherjee, Bakul" To: "'user@commons.apache.org'" Date: Thu, 22 Jul 2010 16:27:44 -0700 Subject: [jxpath] escape dollar character in Xpath expression Thread-Topic: [jxpath] escape dollar character in Xpath expression Thread-Index: Acsp9XlMv7H7txGZTqyDPtkPy4bdHg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-MC-Unique: 110072219275101901 Content-Type: multipart/alternative; boundary="_000_BDBDD676BBF2AC44B2A72AE88A5A6D61531823EFmvmexp01tptimtn_" --_000_BDBDD676BBF2AC44B2A72AE88A5A6D61531823EFmvmexp01tptimtn_ Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Hi, I am using JXPath 1.3 and trying to evaluate a XPath expression that has th= e '$' character in it. My path looks like this: "//data/filter$SearchURN" and I get this error: [junit] WARN (JexlExpression:evaluate) - Caught exception evaluating: = org.apache.commons.jexl.ExpressionImpl@51ef4e. Reason: org.apache.commons.j= xpath.JXPathInvalidSyntaxException: Invalid XPath: '//data/filter$SearchURN= '. Syntax error after: '//data/f' [junit] org.apache.commons.jxpath.JXPathInvalidSyntaxException: Invalid= XPath: '//data/filter$SearchURN'. Syntax error after: '//data/f' My suspicion is that the $ sign is causing the following text to be treate= d as a variable. I tried escaping it with '\' and '$' but that didn't solve the problem. I e= ven tried replacing $ with '$'. That did not work etiher. Is there a way to escape the dollar sign so that it is taken literally and = not treated as a special character? Thanks. The information contained in this email message and its attachments is inte= nded only for the private and confidential use of the recipient(s) named ab= ove, unless the sender expressly agrees otherwise. Transmission of email ov= er the Internet is not a secure communications medium. If you are requestin= g or have requested the transmittal of personal data, as defined in applica= ble privacy laws by means of email or in an attachment to email, you must s= elect a more secure alternate means of transmittal that supports your oblig= ations to protect such personal data. If the reader of this message is not = the intended recipient and/or you have received this email in error, you mu= st take no action based on the information in this email and you are hereby= notified that any dissemination, misuse or copying or disclosure of this c= ommunication is strictly prohibited. If you have received this communicatio= n in error, please notify us immediately by email and delete the original m= essage.=20 --_000_BDBDD676BBF2AC44B2A72AE88A5A6D61531823EFmvmexp01tptimtn_--