Hi, I don't think using a filter yields the desired outcome. With this filter you're only verifying whether the XML file contains a "entry/filter" node. If the XML file is valid this will always succeed but it will not help you in downloading additional files.
I guess what you're looking for is the *splitter*. With the splitter you can process each "entry/link" node separately. Read about it: http://camel.apache.org/splitter.html. Also the splitter allows for easily adding parallel processing latter on: split(xpath("entry/link")).parallelProcessing()...... Regards, Richard http://richardlog.com On Mon, Mar 24, 2014 at 2:21 PM, sb.append <[email protected]> wrote: > Hello, > > I've simple task to parse xml entries containing links to files. For each > entry the file should be downloaded. Is the following route a correct > approach? > > from("direct:start") > .to("http://address.of.xml") > .filter() > .xpath("entry/link") > .to(body()) > .to("file:input); > > I'd like to add parallel download later too. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/download-files-for-each-xml-entry-tp5749276.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
