You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import ballerina/data.xmldata;
import ballerina/io;
type Root record {
string Book;
};
public function main() {
Root|error a = xmldata:parseAsType(xml `<root><Book></Book></root>`);
io:println(a);
}
The above code sample gives {"Book":null} as the rsult, while the expected result should be an error since the Book field in the record is a required field.
Version
2201.10.2
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered:
Description
No response
Steps to Reproduce
The above code sample gives
{"Book":null}
as the rsult, while the expected result should be an error since theBook
field in the record is a required field.Version
2201.10.2
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: