ToXml(#table)

The ToXml() function takes a reference to a table to be converted to XML. It returns a string.

The table needs to be structured in a specific way for the conversion to be successful:

This can best be demonstrated visually with the image below. On the left, the table #xml contains a simple XML file laid out in cells. On the right is that same XML in the format ToXml() expects. It is generated by calling FromXml() on the concatenated strings in the #xml table. Note the indenting of child elements, the layout of attributes, and how the value of the tag c is represented.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d875879c-3955-41df-bf16-bea0f2d334a4/Screenshot_2021-06-17_at_16.10.33.png

Calling ToXml() with the table generated by FromXml() re-encodes the data in the table back into an XML string. Cells in Planarly do not currently display line breaks, so it is shown as a linear string. The string is now ready to be used in a call to an API or for other purposes.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/27eb7c8b-0592-4592-aad1-a8860be4ddec/Screenshot_2021-06-17_at_16.16.08.png