You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Christian Schweers <cs...@web.de> on 2005/09/12 14:18:05 UTC

XPath with XML Beans

Hi

I'm working with XML Beans and want to pass a complex XPath Query to
the XmlObject.selectPath() method. When running the application I get
an
java.lang.RuntimeException
with message 'Trying XBeans path engine... Trying Saxon... FAILED on declare
namespace
s='http://www.myNameSpace.org';.//s:IntegerArgumentType[@name='uint1_t']'.

My Query:
        String queryExpression =
            "declare namespace s=http://www.myNameSpace.org;" +
        ".//s:IntegerArgumentType[@name='uint1_t']";

The FAQ on xmlbeans.apache.org says that
selectPath() can process only very simple querys, but can process more
complex ones if xbean_xpath.jar is on the classpath. But
no matter what I do, I always get the same exception. Saxon is installed and
working, too!

The Query
        String queryExpression =
            "declare namespace s=http://www.myNameSpace.org;" +
        ".//s:IntegerArgumentType/@name";
works fine!!

 How can I make XML Beans process complex XPath querys ??

Thanks for every reply.


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