I would like to send a set of temperature readings to a camel route using
multiple XML nodes. And then split them into individual readings and deal
with them one at a time. This is simplified, in the end I'll use messaging.

This is the route:

<from uri="file://temps.xml" />
<to uri="file://Temperatures" />

Where temps.xml looks like this:

<?xml version="1.0" encoding="UTF-8" ?>
<OneWireZoneName>hot water</OneWireZoneName>
<OneWireZoneName>2nd floor heat</OneWireZoneName>

The route produces a single file with the last reading (last 6 lines of
temp.xml). I'd like it to produce 2 files, with one reading per file. I
saw a similar posting called "XPath Splitter Problem" from April 22, 2010
which discussed this. I have the same issue and I think I've followed the
advice. I toyed with using a loop and changing the XPATH query to
/Temperatures[$CamelLoopIndex] but I think split is what I really want.

Why use XML? I hope if I add a data field, the XML-based code will still
work whereas a CSV list might cause me positional data grief later.

How can I (in DSL) split my concatenated XML file into many single
thermometer files (hopefully without resorting to my own bean)?

An old Fortran IV programmer, learning new tricks

View this message in context: http://camel.465427.n5.nabble.com/xpath-splitter-returns-last-xml-node-tp4670473p4670473.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupusers @
postedAug 5, '11 at 6:42p
activeAug 5, '11 at 9:56p

2 users in discussion

Christian Müller: 1 post Guitarcarver: 1 post



site design / logo © 2022 Grokbase