Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 98426 invoked from network); 26 Mar 2003 18:49:24 -0000 Received: from lakemtao08.cox.net (68.1.17.113) by daedalus.apache.org with SMTP; 26 Mar 2003 18:49:24 -0000 Received: from cox.net ([68.102.206.247]) by lakemtao08.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030326184928.UXVT25910.lakemtao08.cox.net@cox.net> for ; Wed, 26 Mar 2003 13:49:28 -0500 Message-ID: <3E81F70F.7090505@cox.net> Date: Wed, 26 Mar 2003 12:53:03 -0600 From: Venkatesh Prasad Ranganath User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: JXPath: XMl traversal References: <3E81A552.4090405@cox.net> <014401c2f398$f3e78490$0200a8c0@GATEWAY> In-Reply-To: <014401c2f398$f3e78490$0200a8c0@GATEWAY> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Dmitri Plotnikov wrote: > Venkatesh, > > Try passing to the JXPathContext the document itself, rather than its root > element. I believe JXPath is trying to find a child of the root element > called "CONFIGURATION", but of course fails to find one. > > I hope this helps. Nope. I tried passing the document. I also tried giving the root element and "//PROCESSOR" as the xpath expression. Both had no result as in the previous case. Any clues? > > - Dmitri Plotnikov > > ----- Original Message ----- > From: "Venkatesh Prasad Ranganath" > To: > Sent: Wednesday, March 26, 2003 8:04 AM > Subject: JXPath: XMl traversal > > > >>Hi, >> >>The following snippet of code never dives into loop body for the > > subsequent document. Can somebody tell me what might I be > >>doing wrong? >> >> >>Element root = doc.getDocumentElement(); >>JXPathContext ctxt = JXPathContext.newContext(root); >>for(Iterator i = ctxt.iterate("CONFIGURATION/PROCESSOR"); i.hasNext();) { >>System.out.println("1"); >>processProcessor((Element) i.next()); >>} >> >> >> >> >> >> >> >> PROCESSOR1 >> >> >> >>waiting for reply, >>-- >> >>Venkatesh Prasad Ranganath, >>Dept. Computing and Information Science, >>Kansas State University, US. >>web: http://www.cis.ksu.edu/~rvprasad >> >> >>--------------------------------------------------------------------- >>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 > > -- Venkatesh Prasad Ranganath, Dept. Computing and Information Science, Kansas State University, US. web: http://www.cis.ksu.edu/~rvprasad