camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: Split XML with xmlTokenizer and add root element?
Date Tue, 15 Apr 2014 11:55:17 GMT
> I think you are right.
> currently, the result is a series of child elements and the parent
> context information is not included in the result (except the namespace
> binding information that can be extracted into the split child
> elements).
> 
> When I pushed the current implementation, I had the code sitting around
> in my repo to add such options of either wrapping the child with the
> its parent container part or set the parent container part in a
> separate header. But I didn't push that part, as I was not sure about
> whether this was useful (I mean, to be included directly in the
> splitter, as opposed to have this parent extraction step separately)
> and how to expose the configuration parameter for it.
> 
> Probably including the extraction in the splitter is a good idea. I'll
> look at it again.
> regards, aki

I appreciate such an option.
We also have such a data structure containing of a root, a header and multiple data nodes.


Jan

<root>
  <header>
    <...>
  </header>
  <body>
    <data> one </data>
    <data> two </data>
  </body>
</root>

==>

<root>
  <header>
    <...>
  </header>
  <body>
    <data> one </data>
  </body>
</root>

<root>
  <header>
    <...>
  </header>
  <body>
    <data> two </data>
  </body>
</root>


Mime
View raw message