ballerina-platform / ballerina-lang

The Ballerina Programming Language

Home Page:https://ballerina.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: `xml:map` operation when returning consecutive xml:Texts doesn't merge them together

poorna2152 opened this issue · comments

Description

Consider the following code

import ballerina/io;

public function main() {
    xml x1 = xml `<a>abc</a><b>def</b>`;
    xml r = xml:map(xml:elements(x1), y => y.getChildren());
    io:println(r); // abcdef
    boolean b = xml `abcdef` == r;
    io:println(b); // false
}

The equality check here is returned false. This is due to xml:map not merging the consecutive xml:Text.

Steps to Reproduce

No response

Affected Version(s)

2201.9.0

OS, DB, other environment details and versions

No response

Related area

-> Runtime

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response