You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by RTernier <ry...@hotmail.com> on 2013/04/26 02:08:56 UTC
Split and Xpath
I'm having some issues running the xpath on my split. I know the Xpath for
the Choice isn't the best, but it works for now.
I'm getting errors saying:
Invalid xpath: //*[local-name()='QUCR_IN200101BC'],
//*[local-name()='GetDemographics']. Reason:
javax.xml.xpath.XPathExpressionException
Here's what I have:
The Xpath I have for the Split works perfectly fine in Altova XML Spy, yet
bombs here. I was under the impression that on the Split, the Xpath would
return a NodeList which would be iterated through. The Xpath I have does do
this.
XML structure (I removed the nodes that don't matter). THe XML has a
Namespace, which I've added to my Spring XML.
<v3:MCCI_IN200100BC>
<GetDemographics>
</GetDemographics>
<v3:QUCR_IN2001>
</v3:QUCR_IN2001>
</v3:MCCI_IN200100BC>
Any Thoughts?
--
View this message in context: http://camel.465427.n5.nabble.com/Split-and-Xpath-tp5731569.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Split and Xpath
Posted by Claus Ibsen <cl...@gmail.com>.
You can add camel-saxon to the classpath which supports xpath 2.0
http://camel.apache.org/xpath.html
On Fri, Apr 26, 2013 at 2:14 AM, RTernier <ry...@hotmail.com> wrote:
> Realized Camel only supports XPath 1.0. The xpath i was using was 2.0.
> Modified and it's working.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Split-and-Xpath-tp5731569p5731570.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Re: Split and Xpath
Posted by RTernier <ry...@hotmail.com>.
Realized Camel only supports XPath 1.0. The xpath i was using was 2.0.
Modified and it's working.
--
View this message in context: http://camel.465427.n5.nabble.com/Split-and-Xpath-tp5731569p5731570.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Split and Xpath
Posted by RTernier <ry...@hotmail.com>.
I realized that it only supports XPath 1.0, I changed it so the xPath is:
//v3:QUCR_IN200101BC | //v3:GetDemographics
However, when I do that I get this on the output:
[GetDemographics: null]
[v3:QUCR_IN200101BC: null]
It seems it grabbed the right nodes, but nothing under them. Thoughts?
--
View this message in context: http://camel.465427.n5.nabble.com/Split-and-Xpath-tp5731569p5731571.html
Sent from the Camel - Users mailing list archive at Nabble.com.