Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 93474 invoked from network); 15 Aug 2007 19:26:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2007 19:26:14 -0000 Received: (qmail 4323 invoked by uid 500); 15 Aug 2007 19:26:08 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 4260 invoked by uid 500); 15 Aug 2007 19:26:08 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 4241 invoked by uid 99); 15 Aug 2007 19:26:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 12:26:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.151.27.10] (HELO mailhub.hp.com) (192.151.27.10) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 19:26:03 +0000 Received: from [192.168.168.6] (p54A060A9.dip.t-dialin.net [84.160.96.169]) by mailhub.hp.com (Postfix) with ESMTP id 5851627116 for ; Wed, 15 Aug 2007 15:29:29 -0400 (EDT) Message-ID: <46C35331.2040704@hp.com> Date: Wed, 15 Aug 2007 21:25:37 +0200 From: Carsten Schlipf User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: user@commons.apache.org Subject: JXPath: Does not understand ancestor:: and descendant::? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, on the JXPath user's guide I have read that the axes "parent::" and "ancestor::" may be used. However in my code I get JXPathExceptions: JXPathContext context = JXPathContext.newContext(object); context.getValue("ancestor::"); The call to getValue(String) throws the JXPathException with the following message: Invalid XPath: 'ancestor::'. Syntax error after: 'a'. A similar exception is thrown for 'descendant::' and 'parent::'. Am I missing something? Do I have to set a special mode or register the DescendantContext, AncestorContext and ParentContext classes as functions somehow? I tried the later but didn't succeed. Thank you very much for help! Carsten --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org