We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
\#content
Consider this record type.
public type Data record { string \#content; };
When trying to convert a record value from this type to an XML value, it only produces an incorrect value.
The output: this is a string The expected output: <Data>this is a string</Data>
this is a string
<Data>this is a string</Data>
When using an additional attribute it will correctly prints the xml output.
public type Data record { string \#content; @xmldata:Attribute int number; };
The output: <Data number="1">this is a string</Data>
<Data number="1">this is a string</Data>
Run the following code in a single Ballerina file.
import ballerina/data.xmldata; import ballerina/io; public type Data record { string \#content; }; public function main() returns error? { Data document = { \#content: "this is a string" }; xml xmlDocument = check xmldata:toXml(document); io:println(xmlDocument); }
2201.10.0
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Consider this record type.
When trying to convert a record value from this type to an XML value, it only produces an incorrect value.
The output:
this is a string
The expected output:
<Data>this is a string</Data>
When using an additional attribute it will correctly prints the xml output.
The output:
<Data number="1">this is a string</Data>
Steps to Reproduce
Run the following code in a single Ballerina file.
Version
2201.10.0
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: