User Tools

Site Tools


transformations:exportxml

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 layoutSelect whether the output XML structure will be row-based or column-based. Options: Row-based
or Column-based.
Prohibited XML charactersSelect how EasyMorph will respond when a prohibited XML character is encountered. Options: Fail,
Remove the character, or Ignore.
Indent elementsWhen this option is checked, the resulting XML file is formatted with indentations for better readability.
Omit XML declarationWhen this option is checked, the instruction that identifies the file as XML is not included in the output.
File already existsIf 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 parameter.

File already exists options

Option Description
OverwriteThe new file replaces the original file.
RenameThe 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 executionThe 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:

<Columns>
  <Column Id="0" Name="state_long" />
  <Column Id="1" Name="No of companies" />
</Columns>
<Rows>
  <Row Id="0">
    <Cell ColumnId="0" Type="Text">California</Cell>
    <Cell ColumnId="1" Type="Number">311</Cell>
  </Row>
  <Row Id="1">
    <Cell ColumnId="0" Type="Text">Texas</Cell>
    <Cell ColumnId="1" Type="Number">220</Cell>
  </Row>
</Rows>


In the column-based layout, the resulting XML file is a collection of column elements. For instance:

<Columns>
  <Column Id="0" Name="state_long">
    <Cells>
      <Cell RowId="0" Type="Text">California</Cell>
      <Cell RowId="1" Type="Text">Texas</Cell>
    </Cells>
  </Column>
  <Column Id="1" Name="No of companies">
    <Cells>
      <Cell RowId="0" Type="Number">311</Cell>
      <Cell RowId="1" Type="Number">220</Cell>
    </Cells>
  </Column>
</Columns>


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 XSLT action to modify the output of the Export to XML action using XSLT stylesheets.


Community examples


See also

transformations/exportxml.txt · Last modified: 2021/07/15 11:50 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki