Open SasinduDilshara opened 3 weeks ago
import ballerina/io; import ballerina/data.xmldata; type A record { string[] name; int[] id; }; function test() returns error? { string validXmlValue = string `<A><id>1</id><name>John</name><id>1</id><name>John</name><user><id>1</id><name>John</name><id>2</id><name>John2</name></user></A>`; A validatedOutput = check xmldata:parseString(validXmlValue); io:println(validatedOutput); // output: {"name":["John","John"],"id":[1,1],"user":{"id":2,"name":"John2"}} } public function main() returns error? { check test(); }
The expected output is {"name":["John","John"],"id":[1,1],"user":[{"id":1,"name":"John"}, {"id":2,"name":"John2"}]}
{"name":["John","John"],"id":[1,1],"user":[{"id":1,"name":"John"}, {"id":2,"name":"John2"}]}
$Description
2201.10.2
No response
Description
The expected output is
{"name":["John","John"],"id":[1,1],"user":[{"id":1,"name":"John"}, {"id":2,"name":"John2"}]}
Steps to Reproduce
$Description
Version
2201.10.2
Environment Details (with versions)
No response