Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 10675 invoked from network); 15 Jun 2005 07:55:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jun 2005 07:55:13 -0000 Received: (qmail 11253 invoked by uid 500); 15 Jun 2005 07:55:06 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 11232 invoked by uid 500); 15 Jun 2005 07:55:06 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 11218 invoked by uid 99); 15 Jun 2005 07:55:06 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mx-out.forthnet.gr (HELO mx-out-01.forthnet.gr) (193.92.150.103) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 15 Jun 2005 00:55:03 -0700 Received: from mx-av-02.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-01.forthnet.gr (8.12.11/8.12.11) with ESMTP id j5F7sfPG024094 for ; Wed, 15 Jun 2005 10:54:41 +0300 Received: from mx-as-03.forthnet.gr (mx-as.forthnet.gr [193.92.150.226]) by mx-av-02.forthnet.gr (8.12.11/8.12.11) with ESMTP id j5F7sfKi019908 for ; Wed, 15 Jun 2005 10:54:41 +0300 Received: from forthnet.gr (athmta03.forthnet.gr [193.92.150.22]) by mx-as-03.forthnet.gr (8.12.11/8.12.11) with ESMTP id j5F7sdHM006772 for ; Wed, 15 Jun 2005 10:54:39 +0300 Received: from chimaera.rd.forthnet.gr (chimaera.rd.forthnet.gr [212.251.99.170]) by forthnet.gr (8.12.11/8.12.11) with ESMTP id j5F7sdAi010991 for ; Wed, 15 Jun 2005 10:54:39 +0300 From: Markos Charatzas Organization: FORTHnet A.E. To: commons-user@jakarta.apache.org Subject: Re: [jxpath] retrieving sub xml Date: Wed, 15 Jun 2005 10:54:38 +0300 User-Agent: KMail/1.7.2 References: <20050614153710.85456.qmail@web30503.mail.mud.yahoo.com> In-Reply-To: <20050614153710.85456.qmail@web30503.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506151054.38441.xarm@forthnet.gr> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hey Dimitri, Thanks for taking the time. I've seen this method but as far as I can see it returns a reference to the node (DeferredElementNSImpl, using xerces) which has all methods to play with it. What I really want is the textual representation of the node inc. the tags. I was hoping that #toString() would return that but my assumption failed me. Am I missing smth? Thanks again, Markos On Tuesday 14 June 2005 18:37, Dmitri Plotnikov wrote: > Markos, > > The method you need to use is context.selectSingleNode > > - Dmitri > > Markos Charatzas wrote: > Maybe it requires some clarification. > > When I say rich formattted text, I get all the values evaluated by the > xpath expression, but without the tags. Just tab, return characters and > values of tags. > > e.g. in an xml of > > > > > foo > 20 > > > > > bar > 25 > > > foobar > 20 > > > > I want to retrieve just all > elements with age = 20 > (xpath "persons/person[age=20]") > > Is it feasible using the jxpath API? > > Thanks in advance, > Markos > > On Monday 13 June 2005 12:36, Markos Charatzas wrote: > > Hi there, > > > > Is it possible to retrieve a subset of an XML document using the jxpath > > api? The JXPathContext#getValue(String) method returns it in rich > > formatted text. > > > > Thanks in advance, > > Markos Charatzas > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org