Skip to content

Headers in csvtoxml are set despite option is disabled #735

Description

@Hooghof

In the test case below, the option to use the first line of the CSV as headers is disabled. Despite this, the first line is used for XML nodes. possibly related to #700.

Input

ID|Name|Number
1|Pete|1001
2|John|1002
3|Frank|1003
4|Max|1004

Output

<?xml version="1.0" encoding="UTF-8"?>
<items>
    <item>
        <ID>1</ID>
        <Name>Pete</Name>
        <Number>1001</Number>
    </item>
    <item>
        <ID>2</ID>
        <Name>John</Name>
        <Number>1002</Number>
    </item>
    <item>
        <ID>3</ID>
        <Name>Frank</Name>
        <Number>1003</Number>
    </item>
    <item>
        <ID>4</ID>
        <Name>Max</Name>
        <Number>1004</Number>
    </item>
</items>

Expected Output

<?xml version="1.0" encoding="UTF-8"?>
<items>
    <item>
        <string>ID</string>
        <string>Name</string>
        <string>Number</string>
    </item>
    <item>
        <string>1</string>
        <string>Pete</string>
        <string>1001</string>
    </item>
    <item>
        <string>2</string>
        <string>John</string>
        <string>1002</string>
    </item>
    <item>
        <string>3</string>
        <string>Frank</string>
        <string>1003</string>
    </item>
    <item>
        <string>4</string>
        <string>Max</string>
        <string>1004</string>
    </item>
</items>

Test cases
Instance: next and development
Tenant: Regression Tests
Flow: CsvToXml_noheaderpipedelimited

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions