Generating complex XML structures
In previous recipes, you learned how to read and write simple XML structures. With Kettle, you can also generate more complex structures with different levels of information, which is more likely to be similar to the structures you find in real case scenarios. Suppose you need to create a complex XML structure with a hierarchy of two levels: the authors in the first level and their books as their children. In this case, you can't use the XML output job entry, because it only works with simple structures. For theses cases, you must learn to use the XML Join step.
The objective for the recipe is to get the following XML structure:
<result> <authors> <author id_author =…> <lastname>…</lastname> <firstname>…</firstname> ...
Get Pentaho Data Integration Cookbook Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.