{{ transformations:ExportXmlAction.png}}
======EXPORT TO XML======
Category: Export / File\\
\\
=====Description=====
Exports the current tabular dataset into an XML file.\\
\\
=====Action settings=====
^ Setting ^ Description ^
|File*| The fully-qualified file name of the output dataset (includes relative or absolute path). |
|File layout|Select whether the output XML structure will be row-based or column-based. Options: //Row-based//\\ or //Column-based//.|
|Prohibited XML characters|Select how EasyMorph will respond when a prohibited XML character is encountered. Options: //Fail//,\\ //Remove the character//, or //Ignore//.|
|Indent elements|When this option is checked, the resulting XML file is formatted with indentations for better readability.|
|Omit XML declaration|When this option is checked, the instruction that identifies the file as XML is not included in the output.|
|File already exists|If a file with the same name already exists, choose whether to overwrite the existing file, rename\\ the existing file, or halt the action's execution. See the following table for details.|
* Setting can be specified using a [[:parameters|parameter]].\\
\\
====File already exists options====
^Option ^Description ^
|Overwrite|The new file replaces the original file.|
|Rename|The original file will be renamed with "backup" and a serial number appended to the file name. The new file will\\ possess the name specified in the //File// setting.|
|Halt project execution|The project will stop processing and this action will display a warning symbol.|
\\
===== File layout =====
Two types of XML layout are supported: row-based and column-based.\\
In the row-based layout, the resulting XML file is structured as a collection of row elements. For instance:
California |
311 |
Texas |
220 |
\\
In the column-based layout, the resulting XML file is a collection of column elements. For instance:
California |
Texas |
311 |
220 |
\\
=====Remarks=====
This action doesn't provide a means for generating additional XML attributes, or other XML elements, in addition to the predefined ones. If a specific XML structure is required, use the [[transformations:xslt|XSLT action]] to modify the output of the //Export to XML// action using XSLT stylesheets.
\\
=====Community examples=====
* [[https://community.easymorph.com/t//1755/9|EasyMorph 4.3 : Tableau Hyper Addon logs]] ([[https://community.easymorph.com/uploads/short-url/22W0a67rOyb81dAD8zNmISfuMDK.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Create metadata file//; Action position: //5//)
\\
=====See also=====
* [[transformations:exportplaintext|Export plain text]]
* [[transformations:importxml|Import from XML]]
* [[transformations:xslt|XSLT]]