Hello,

I have to deal with large xml data in our camel application. In the camel
documentation I've found the splitting with the
xmltokenizer(split().xmlTokenize(<tag>)).
First it looked fine for me, but then I noticed that there is no possibility
to add the root element to the splitted xml's.

Xml looks like this:
<root>
  <tosplit>
  </tosplit>
  <tosplit>
  </tosplit>
  <tosplit>
  </tosplit>
  <tosplit>
  </tosplit>
...
</root> 

Output of xmltokenize("tosplit"):
1. xml:
<tosplit>
</tosplit>
2. xml:
<tosplit>
</tosplit>
...

Output needed:
1. xml:
<root>
  <tosplit>
  </tosplit>
<root>
2. xml:
<root>
  <tosplit>
  </tosplit>
<root>
...

Maybe I missed something in the camel docu, is there a way in camel to get
the output from above?
Perhaps I can use something other than the xmltokenizer?

kind regards, 
Christoph 




--
View this message in context: 
http://camel.465427.n5.nabble.com/Split-XML-with-xmlTokenizer-and-add-root-element-tp5750237.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to