You are using tXMLMap, and tXMLMap supports multiple loop element, so you should define the XML tree on tXMLMap, not tAdvancedOutputXML, tAdvancedOutputXML don't support multiple loop elements. on tXMLMap, add a new column with Document type, and then define the xml tree. see pic1.
To generate the result as a XML file, link it to a tFileOutputXML and check the 'incoming record is a document' box.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Test drive Talend's enterprise products.