-
Notifications
You must be signed in to change notification settings - Fork 736
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
using a xml prolog leads to an error within xml literal #9275
Comments
Hi @JensWalter, XML Literal (xml `some content`) only allows to parse a single xml item (a single element, text, comment or a processing instruction). However in This behavior is intended. But I agree that the error message is not very intuitive, as it is thrown from the parser. The solution is to define them separately, and concat them, as you have done with x1, x2 and x3. |
This is indeed not self explanatory and very inconvenient for constructing XMLs. Is there any other way to generate the Prolog after the xml is constructed? |
At the moment, there's no alternative way, but to concat the prolog to the xml element.. |
You just added a label to this when I was about to close this issue. |
@JensWalter Great! Im closing the issue as per your reply. Please do reopen, if you encounter any other issue related to this. |
Description:
If I set a prolog for a xml literal, ballerina fails with "mismatched input '<'. expecting XMLLiteralEnd".
Since xml instructions are supported, setting a prolog inline should also be supported.
Steps to reproduce:
Constructing a xml literal with xml prolog leads to an error.
Affected Versions:
0.976.0
Related Issues (optional):
Suggested Labels (optional):
Type/Bug
Suggested Assignees (optional):
The text was updated successfully, but these errors were encountered: