Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace informations not preserved for arrays in toXml function in data.xmldata module #7389

Open
SasinduDilshara opened this issue Nov 20, 2024 · 0 comments
Assignees
Labels
module/data.xmldata Status/Blocked Issues that are currently blocked. Type/Bug

Comments

@SasinduDilshara
Copy link
Contributor

Description

import ballerina/data.xmldata;
import ballerina/io;

type A record {
    @xmldata:Namespace {
        uri: "http://www.example.com",
        prefix: "ex"
    }
    int[] name;
};

public function main() {
    A a = {name: [1, 2, 3]};
    io:println(xmldata:toXml(a)); // Output: <A><name>1</name><name>2</name><name>3</name></A>
}

The output doesn't contains any namespace informtions.

Steps to Reproduce

$Description

Version

2201.10.2

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/data.xmldata Status/Blocked Issues that are currently blocked. Type/Bug
Projects
Status: In Progress
Development

No branches or pull requests

1 participant