-
1. Re: The splitter - how does it work ?
davsclaus Apr 26, 2012 7:27 AM (in response to simplex-software)It will iterate the expression, so in your case you are tokenizing the message body. Camel uses the java.util.Scanner when you use the tokenize in the DSL. So make sure that this tokenizer works as expected.
-
2. Re: The splitter - how does it work ?
simplex-software Apr 26, 2012 9:49 AM (in response to davsclaus)Hi Claus,
Thank you for helping again. Yes, the problem comes from the tokenizer. I made a separate test using the java.util.Scanner and it appears that it doesn't work as I expected. I have an XML file and I want to split it XML element by XML element.
For example:
<0>
11111111111
22222222222
............................
</0>
And i use "</0>" as a tokenizer but, what happens is that the tokenizer itself, ie "</0>", is not included. Is there any option to specify a splitting such that to have every thing between <0> and </0>, including <0> and </0>, i any splited part ?Many thanks in advance,
Nicolas
-
3. Re: The splitter - how does it work ?
davsclaus Apr 26, 2012 11:09 AM (in response to simplex-software)Hi
If you XML file is not big, you can use xpath instead. But that would mean the file content is loaded into memory.
And for splitting big files see a few blog posts I did
http://davsclaus.blogspot.se/2011/11/splitting-big-xml-files-with-apache.html
http://davsclaus.blogspot.com/2011/11/splitting-big-xml-files-with-apache_24.html
-
4. Re: The splitter - how does it work ?
simplex-software Apr 27, 2012 11:44 AM (in response to davsclaus)Hi Claus,
Many thanks. The current file is not too big and the splitting works for now, but it may become much larger. The problem is that the stax parsing and the XML tokens are supported, as far as I understood, starting with Camel 2.9 which is not yet available in download on the FuseSource web-site. It may be available at the Apache site but we are using the FuseSource one.
Kind regards,
Nicolas
-
5. Re: The splitter - how does it work ?
davsclaus Apr 27, 2012 11:46 AM (in response to simplex-software)Yeah Fuse Camel 2.9 will be released as part of the upcoming Fuse ESB Enterprise.
http://fusesource.com/press-releases/fusesource-press-release-04-10-2012/