import ballerina/io;
import ballerina/data.xmldata;
xml x2 = xml `
<A xmlns:ns1="example1.com" xmlns:ns2="example2.com">
<ns1:port>1</ns1:port>
<ns2:port>1</ns2:port>
</A>
`;
type A record {|
record{}[] port;
|};
public function main() {
A|error rec = xmldata:parseAsType(x2);
io:println(rec);
}
Please consider the above code,
For the Update 10 RTC1 pack, this gives output as {"port":[{"#content":1}]}, But it should be {"port":[{"#content":1}, {"#content":1}]}
Please consider the above code,
For the Update 10 RTC1 pack, this gives output as
{"port":[{"#content":1}]}
, But it should be{"port":[{"#content":1}, {"#content":1}]}