You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Dan Diephouse <da...@mulesource.com> on 2007/12/20 20:57:18 UTC
XPath query with space in node name
Hi all,
I'm trying to query a node which has a space in its name. My initial
attempt was "//Foo Bar" where the node's name is "Foo Bar". But this
doesn't seem to work.
Any advice on what to do? I've tried a whole range of things to no avail...
- Dan
--
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog
Re: XPath query with space in node name
Posted by Alexandru Popescu ☀ <th...@gmail.com>.
On Dec 20, 2007 10:09 PM, Dan Diephouse <da...@mulesource.com> wrote:
> OK, I don't know why I didn't just look at the specification first, but
> that helped. I just needed to replace the space with "_x0020_".
>
> Is there a jackrabbit class or a utility class floating around that can
> handle all the escaping rules for me?
>
Yes, I think there is/are one, but my memory is not helping me right
now (I think they are called something like ISOsomething).
./alex
--
.w( the_mindstorm )p.
> Thanks,
> - Dan
>
>
> Dan Diephouse wrote:
> > Hi all,
> >
> > I'm trying to query a node which has a space in its name. My initial
> > attempt was "//Foo Bar" where the node's name is "Foo Bar". But this
> > doesn't seem to work.
> >
> > Any advice on what to do? I've tried a whole range of things to no
> > avail...
> >
> > - Dan
> >
>
>
> --
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
>
>
Re: XPath query with space in node name
Posted by Dan Diephouse <da...@mulesource.com>.
OK, I don't know why I didn't just look at the specification first, but
that helped. I just needed to replace the space with "_x0020_".
Is there a jackrabbit class or a utility class floating around that can
handle all the escaping rules for me?
Thanks,
- Dan
Dan Diephouse wrote:
> Hi all,
>
> I'm trying to query a node which has a space in its name. My initial
> attempt was "//Foo Bar" where the node's name is "Foo Bar". But this
> doesn't seem to work.
>
> Any advice on what to do? I've tried a whole range of things to no
> avail...
>
> - Dan
>
--
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog