I'm using a webservice that needs plain xml as an argument. The XML looks like this: <rows> <row> <rowcolumn columnname="RelatieNr" value="1" /> <rowcolumn columnname="Naam" value="Test" /> <rowcolumn columnname="Naam2" value="Test2" /> <rowcolumn columnname="Adres" value="Adres" /> <rowcolumn columnname="Postcode" value="0000AA" /> <rowcolumn columnname="Woonplaats" value="Plaats" /> <rowcolumn columnname="Telefoon" value="0000000000" /> <rowcolumn columnname="Email" value="email@example.com" /> <rowcolumn columnname="BedrijfJN" value="True" /> </row> </rows> I'm using an XML schema and a Domain-to-XML-mapping. I would like to fill the xml bij iterating through the "row"-tags and fill the "rowcolumn"-tags with data from my domain. I do not know how to do this, because the "row"-tags and the "rowcolumn"-tags are on a different level. I only have one object in Mendix, but in the Domain-to-XML mapping I have to define two mappings. One mapping for the "row"-level and one mapping for the "rowcolumn"-level. Thanks!
Create a model with the same structure as xml: rows-row-rowcolumn.
Mapping that to XML is straightforward.
Write a piece of java that converts your entity to this structure by iterating thru the rows and create an rowcolumn-object per member.
Chris de Gelder
Though the solution of Chris de Gelder was the best answer to my question, I was forced to have the webservice changed. After changing the webservice, I was able to use another XSD (without the extra level 'Row').