-
Notifications
You must be signed in to change notification settings - Fork 1
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
XML deserialization incorrectly reports missing text for tags with text #17
Comments
mristin
added a commit
that referenced
this issue
Feb 14, 2024
The ElementTree's `XMLPullParser` sometimes attaches the text to the start element and sometimes to the end element. We could not figure out why there is a different behavior, but suspect that it has something to do with the size of the parser buffer. In this patch, we fix by looking for text in both events (start as well as end element). This is related to the issue #17, and based on the aas-core-codegen after the pull request aas-core-works/aas-core-codegen#443 has been merged in, [aas-core-codegen 330f391]. [aas-core-codegen 330f391]: aas-core-works/aas-core-codegen@330f391
mristin
added a commit
that referenced
this issue
Feb 14, 2024
The ElementTree's `XMLPullParser` sometimes attaches the text to the start element and sometimes to the end element. We could not figure out why there is a different behavior, but suspect that it has something to do with the size of the parser buffer. In this patch, we fix by looking for text in both events (start as well as end element). This is related to the issue #17, and based on the aas-core-codegen after the pull request aas-core-works/aas-core-codegen#443 has been merged in, [aas-core-codegen 330f391]. [aas-core-codegen 330f391]: aas-core-works/aas-core-codegen@330f391
Fixed in #18. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Current behaviour (bug)
The XML deserialization wrongly attests that some valid XML files are invalid. This results in a failure to deserialize the asset administrative shell.
Expected behaviour (correct)
Successfully deserialize the shell.
Relevant logs and/or media (optional)
Minimal sample simple.zip
Other comment
The error is due to implementation details of the Python XML library (see the note for aas-core-works/aas-core-codegen#443 (comment)). It is thus dependend on the length of the XML file.
aas-core-works/aas-core-codegen#443 (comment) addresses this issue.
The text was updated successfully, but these errors were encountered: