Hi,

On Fri, Sep 19, 2008 at 9:05 PM, VenkiSM
<[EMAIL PROTECTED]> wrote:
>    We are using JR as content repository and when creating a node as
> Query query = queryManager.createQuery(queryString, Query.XPATH);
>
> where queryString takes values "//PRINT/CARDS & PAYMENTS and and Query.XPATH
> is "xpath".
>
> Exception is thrown at this point....

You'll need to encode any characters that are not valid in XML names.
The ISO9075 class in jackrabbit-jcr-commons implements the required
encoding mechanism. You can use it for example like this:

    import org.apache.jackrabbit.util.ISO9075;
    String queryString =
        "//" + ISO9075.encodePath("PRINT/CARDS & PAYMENTS");

BR,

Jukka Zitting

Reply via email to