{{ transformations:ParseXmlAction.png}}
======PARSE XML======
Category: Transform / Web\\

\\ 
=====Description=====
Parse XML data into a tabular format.\\

\\ 
=====Use cases=====
  *Enterprise data parsing from enterprise systems (e.g., transactions, messages).
  *Parse data from Web APIs that return XML.

\\ 
=====Action settings=====
^ Settings  ^ Description  ^
| Column  | Select the column containing the source XML to be parsed.  |
| Decimal separator | Select the decimal separator in numeric values.  Options: //Comma// or //Dot//.|
| Thousand separator | Select the thousands separator in numeric values.  Options: //Default//, //Comma//, //Point// or //Space//.|
| DTD processing | Options:  //Prohibit//, //Ignore//, or //Parse// DTD.  |
| Value types  | Options:  //Auto// (automatically recognize numeric values and convert them into numbers) or\\ //All text// (treat all values as text). |
| Root XML path<sup>*</sup>  | The path to the XML node from which parsing starts.  |
| Column names  | Select the method used to name columns in the result dataset.  Options:  //Element name//,\\ //Relative XML path//, or //Full XML path//.   |
| Don't delete original column  | When checked, the source column with JSON(s) will be kept in the result dataset.  |
| Parse paths | Select the XML paths to parse.  One path corresponds to one column in the result dataset.\\  Options:  //Parse all paths// or //Parse selected paths//  (and select the paths from the list). |
<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\

\\
=====Examples=====
====Example #1====
>Parse the submitted XML-formatted data in the "Customer List" column.

===Before (source table)===
<code>
<data>
<person><id>1</id><name>John Doe</name><age>30</age></person>
<person><id>2</id><name>Jane Smith</name><age>25</age></person>
<person><id>3</id><name>Michael Johnson</name><age>40</age></person>
</data>
</code>

===After (result table)===
^id ^name ^age ^
|  1|John Doe  |  30|
|  2|Jane Smith  |  25|
|  3|Michael Johnson  |  40|

===Action parameters===
>Column: Customer List
>Root XML path: data
>Column names: Element name
>Parse paths: Parse selected paths
>Selected paths: person/age, person/id, person/name

\\ 
=====See also=====
  * [[transformations:importxml|Import XML]]
  * [[transformations:parsejson|Parse JSON]]
