XML to JSON component
The XML to Json component provides a direct conversion from XML format to JSON format.
Configuration
It can be configured with the following options:
Property | Description |
---|---|
Force Top Level Object | Determines whether the resulting JSON will start off with a top-most element whose name matches the XML root element. If disabled, XML string <a><x>1</x><y>2</y></a> turns into { 'x: '1', 'y': '2' } . When enabled it turns into { 'a': { 'x: '1', 'y': '2' }} . |
Skip whitespace | Determines whether white spaces between XML elements will be interpreted as text values or will be ignored. |
Trim spaces | Determines whether leading and trailing white spaces will be omitted from String values. |
Skip namespaces | Signals whether namespaces should be ignored. By default they will be added to the JSON output using @xmlns elements |
Remove namespace prefixes | Removes the namespace prefixes from XML qualified elements, so that the resulting JSON string does not contain them. |
The default value for all of these properties is false
.
Remarks
- Empty XML tags, like
<Reference_two/>
or<Reference_two></Reference_two>
will be converted to Json as empty arrays:"Reference_two":[]