Skip to main content
Skip table of contents

YAML Converter

This adapter converts a YAML document into an XML document and vice versa.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Convert YAML to XML: Convert a YAML document into an XML document
  • Convert XML to YAML: Convert an XML document into a YAML document

Parameters

Adapter

Main adapter class (do not change!)

Possible values:

  • de.softproject.x4.adapter.yaml.YamlAdapter: Main class (default)
processStrings

Controls whether numeric types and booleans are read and normalized by the adapter (true) or simply treated as literal strings (false)

Possible values:

  • true: Numeric types and booleans are read and normalized
  • false: Numeric types and booleans are treated as literal strings

Status values

1

The conversion was successful and the output is generated 

-1An error occurred during the conversion and no output is generated

Input

Depending on the selected operations, the adapter expects the following input structure: 

  • Convert YAML to XML:

    YAML Input

    YML
    example:
        element1:
        - value1
        - value2
        - childValue1: 1
          childValue2: 2
        element2: value3
  • Convert XML to YAML:

    XML Input

    XML
    <Object>
        <Object name="example">
           <Array name="element1">
             <Value>value1</Value>
             <Value>value2</Value>
             <Object>
              <Value name="childValue1">1</Value>
              <Value name="childValue2">2</Value>
             </Object>
           </Array>
           <Value name="element2">value3</Value>
        </Object>
    </Object>

Output

Depending on the selected operations, the adapter outputs the following structure:

  • Convert YAML to XML:

    XML Output

    XML
    <Object>
        <Array name="element1">
           <Value>value1</Value>
           <Value>value2</Value>
           <Object>
             <Value name="childValue1">1</Value>
             <Value name="childValue2">2</Value>
           </Object>
        </Array>
        <Value name="element2">value3</Value>
    </Object>
  • Convert XML to YAML:

    YAML Output

    YML
    element1:
    - value1
    - value2
    - {childValue1: 1, childValue2: 2}
    element2: value3
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.