Skip to content
New issue

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

CCE for xml text values with regex type in data.xmldata module #6974

Open
SasinduDilshara opened this issue Sep 6, 2024 · 0 comments · May be fixed by ballerina-platform/module-ballerina-data.xmldata#45

Comments

@SasinduDilshara
Copy link

import ballerina/data.xmldata;
import ballerina/io;

public function main() returns error? {
    record {string:RegExp \#content;}|error rec5 = xmldata:parseAsType(xml `<A>42</A>`);
    io:println(rec5);
}

This code gives

error Error ("class java.lang.Long cannot be cast to class io.ballerina.runtime.internal.values.RegExpValue (java.lang.Long is in module java.base of loader 'bootstrap'; io.ballerina.runtime.internal.values.RegExpValue is in unnamed module of loader 'app')")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: PR Sent
1 participant