Converts JSON values to XML documents.
The json values might contain multiple objects/values in which
case these cannot be represented using XML without an artificial root node. For this reason we always
create a root node. You can use the XPath node to remove it when possible (or to create a collection of
XML values).
In general object keys starting with @ and having simple values get translated to xml
attributes, the only exception could be for the key of the text if specified (which case it will be XML
text). Every non-letter or number or _ character will be removed from the keys, which might cause
ambiguity or create empty names, but will be kept as an attribute with key: ns:originalKey
, so it is recommended to stick to English letters in JSON object keys.
[] JSON array when the Omit type information is unchecked. Otherwise it is
not possible to distinguish between [] and {}.{
"a" : [
{"b" : 2},
{"c" : 3}
]
} gets translated to
<a>
<b>2</b>
</a>
<a>
<c>3</c>
</a>
otherwise, it is translated to:
<a>
<item>
<b>2</b>
</item>
<item>
<c>3</c>
</item>
</a>
{"#comment": "content"}
can either be translated to XML elements
<comment
ns:originalKey="#comment">
content
</comment>
or to XML comments
<!--content-->{"?pi": "content"}
can either be translated to XML elements
<pi ns:originalKey="?pi">
content
</pi>
or to XML processing instructions
<?pi content?>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.
To use this node in KNIME, install the extension KNIME JSON-Processing from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!