The Definitive Guide to Data Quality
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.