java - Split xml file in camel using the .split().tokenizeXML()? -
how split xml file in camel using .split().tokenizexml()? have attached code snippet. dont know did mistake. here input.
<record> <datafile xmlns="created"> </datafile> <datafile xmlns="updated"> </datafile> <datafile xmlns="deleted"> </datafile> </record>
here camel route
// main route from(...) .routeid("processor route") .process(...) .to("direct:created", "direct:updated", "direct:deleted").end(); // created from("direct:created") .routeid("created route") .split().tokenizexml("xmlns:created", "record") .to(...).end(); // updated from("direct:updated") .routeid("updated route") .split().tokenizexml("xmlns:updated", "record") .to(...).end(); // deleted from("direct:deleted") .routeid("deleted route") .split().tokenizexml("xmlns:deleted", "record") .to(...).end();
my expected output ... direct:created should split , use 1 only.
<datafile xmlns="created"> </datafile>
direct:updated should split , use 1 only.
<datafile xmlns="updated"> </datafile>
and direct:deleted should split , use 1 only.
<datafile xmlns="deleted"> </datafile>
you cannot split namespace using tokenizexml. need split file yourself, or write code can split namespace.
Comments
Post a Comment