commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Snehal Khanna <snehal_hari...@yahoo.com>
Subject Re: JXPath Built-in functions
Date Wed, 04 Feb 2004 18:49:21 GMT
Thanks Dmitri. The alternate syntax works.

~Snehal
--- Dmitri Plotnikov <dmitri@apache.org> wrote:
> There is clearly a problem in JXPath's
> implementation of local-name and
> a bunch of other functions when used without an
> argument. I will fix it
> tonight.
> 
> The syntax that will work with the current version
> is:
> 
> /*[local-name(.)="Envelope" and
>
namespace-uri(.)="http://schemas.xmlsoap.org/soap/envelope/"]
> 
> Thanks for bringing this problem to my attention.
> 
> - Dmitri
> 
> 
> --- Snehal Khanna <snehal_haridas@yahoo.com> wrote:
> > I am new to JXPath and am evaluating different
> xpath
> > expressions to get a feel of JXPath. am having
> trouble
> > with some built in functions.
> > 
> > This is the xpath expression to be evaluated
> against a
> > SOAP request:
> > /*[local-name()="Envelope" and
> >
>
namespace-uri()="http://schemas.xmlsoap.org/soap/envelope/"]
> > 
> > My code looks like this:
> > 
> > //get a DOM object
> > Document doc =
> > getDocument("D:\\jxpathtest\\soap.xml");
> > JXPathContext context =
> JXPathContext.newContext(doc);
> > Iterator itr = context.iteratePointers(xpath);
> //where
> > xpath is the above expression
> > while(itr.hasNext())
> > {
> >   Pointer ptr = (Pointer) itr.next();
> >   System.out.println("Value: " + ptr.getValue());
> > }
> > 
> > My problem is that itr.hasNext() returns false.
> > 
> > Appreciate any help on figuring this out.
> > 
> > Regards
> > Snehal
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free web site building tool.
> Try it!
> > http://webhosting.yahoo.com/ps/sb/
> > 
> >
>
---------------------------------------------------------------------
> > 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
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message