Closed ghoulbel closed 2 months ago
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
Description:
I'm encountering a ClassCastException when using xmldata:toXml to convert a custom record type to XML.
Steps to reproduce:
import ballerina/data.xmldata; import ballerina/io; public type VersionType string; public type PayloadAnyType record { @xmldata:Attribute VersionType 'version?; string 'type?; }; public function main() returns error? { PayloadAnyType payload = {'version: "1.0", 'type: "example"}; xml result = check xmldata:toXml(payload); io:println(result); }
Affected Versions: Data.xmldata version: 0.1.3 Ballerin 2201.9.1