Hi Folks,
I'm trying to split an xml document using an xpath expression. Its failing with 
an InvalidPayloadException[1]. I'm using a camel route like the following:

from("file:src/source.xml?noop=true").splitter(xpath("//Row1")).to("file:target/output");

I've included a sample of the source xml below[2]. I've also tried 
/foosource/Row1, xpathbuilders etc but to no avail.
I suspect that I'm missing something simple here. Can someone point me in the 
right direction?
Thanks in advance.
--Frank

[1]
caught: org.apache.camel.InvalidPayloadException: No in body available of type: 
java.io.InputStream but has value: [Row1: null] of type: 
org.apache.xerces.dom.DeferredElementNSImpl on: Message: [Row1: null] on the 
exchange: Exchange[Message: [Row1: null]]

[2]
<?xml version="1.0" encoding="UTF-8"?>
<foosource>
    <Row1>
        <Name>Joe Bloggs</Name>
        <Country>UK</Country>
    </Row1>
    <Row1>
        <Name>Billy Burgeos</Name>
        <Country>IE</Country>
    </Row1>
    <Row1>
        <Name>Ronald McDonald</Name>
        <Country>US</Country>
    </Row1>
</foosource>

Reply via email to