User Tools

Site Tools


transformations:exportxml

Export to XML file

Exports the current tabular dataset into an XML file.

The action doesn't provide 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.

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>

Indentation

When the option "Indent elements" is checked, the resulting XML file is formatted for better readability.

See also

transformations/exportxml.txt · Last modified: 2021/01/14 20:25 by dmitry