XML to JSON

Converts XML values to JSON values.

Attributes are translated with prefix @, processing instructions with ? prefix to their name as a key in a JSON object.

When there are multiple texts surrounding inner elements, those are translated as JSON array elements instead of an object with the specified key.

Example:<a b="2"><v>some text</v></a> gets translated to:{"a": {"@b": "2", "v": {"#text": "some text"} } }

Options

Input column
Column containing XML values
Replace input column
Replace input column, keep its name
Append new column
Name of the new (JSON) column
Text body translated to JSON with key
This key will be used for XML text content to be represented in JSON
Translate comments
When checked, comments (such as <-- comment -->) will be translated with key: #comment, otherwise they are omitted in the JSON output
Translate processing instructions
When checked, processing instructions (such as <?do?>) will be translated with prefix ?, otherwise they are omitted in the JSON output

Input Ports

Icon
Table with an XML column.

Output Ports

Icon
Table containing the converted JSON column.

Popular Predecessors

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.