How to export a complex structure to XML

How to export a complex structure to XML


I am trying to figure out a way to turn a complex structure to XML to download. I can of course easily expose this as a soap service and return XML that way, but in this instance I need an actual file.  In the attached OML,  I have sample data that loads automatically.  I should say that I tried serveral components - and in this last version i was trying the RecordToXML.  To see where my issue is, on the home page which is a list of orders, the last column has a download icon connected to the action to try to download the file.  Thanks for your help.
Hi Stacey,
Your variable must be of a Record type, not of the Structure type (the XmlRecords does not support those new types yet).
So, in your example what you need to do is change the FullOrderData variable to become a Record of REST_FullOrderInformation (instead of the direct REST_FullOrderInformation type).

Change from


Note that you have the same issue with lists. So in your example you'll also need to change the OrderDetails attribute of the REST_FullOrderInformation from being a "List of REST_OrderDetail" to be a "List of Record of REST_OrderDetail"

The attached example is working properly already with these changes


The latest version of Xml Records should be able to work using directly the structure/list types. So you might want to try reverting back to your base version, and try it with the new Xml Records version.

Kudos to João Rosado for that improvement :)