Hi

A good idea is to use the search box on the Camel front page
Then you can type in eg: endChoice and read the links



On Mon, May 6, 2013 at 2:28 PM, nikagra <nika...@gmail.com> wrote:
> Hello
>
> I have question about end() and endChoice() expressions. Here is how my
> route looks like:
> Some XML-->split-->continue processing
>
> XML structure is like:
> <person><name>V. Lenin</name><address>Soviet Russia, Moscow,
> Kremlin</address></person>
>
> Here is part of my route:
> .split(xpath("/person/*"))
>         .convertBodyTo(String.class)
>         .choice()
>                 .when(xpath("/address"))
>                         .setBody(xpath("/person/adderss/text()"))
>                         .to("direct:processAddress")
>                 .when(xpath("/name"))
>                         .setBody(xpath("/person/name/text()"))
>                         .to("direct:process")
>         .end() // (*)
> .end()
>
> During XML processing I want to process parts of XML (i.e. write them to
> file) and then process initial XML as a whole. I've found that depending of
> what I put to line marked with asterisk message will contain either one of
> splitted parts (name or address if endChoice() is put in this line) or whole
> message (in case of end()).
> I failed to find some exhaustive documentation on when I should use end() or
> endChoice() expressions
>
> Could you please explain such behavior?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Question-about-Camel-end-and-endChoice-expressions-tp5732079.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: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to