Open opcfoundation-org opened 2 years ago
Tagging subscribers to this area: @dotnet/area-system-xml See info in area-owners.md if you want to be subscribed.
Author: | opcfoundation-org |
---|---|
Assignees: | - |
Labels: | `area-System.Xml`, `untriaged` |
Milestone: | - |
For triage purposes, I can repro this behavior on 4.8, 5.0, 6.0, and 7.0-rc1.
Description
Calling Deserialize() on a XML document that has the following in an array of XMLElements:
<Value/>
Immediately stops processing (effectively truncating the document).
Works if the following are used:
<Value xsi:nil="true" /> or <Value></Value>
The schema for the XML element be de-serialized is here: https://files.opcfoundation.org/schemas/UA/1.05/UANodeSet.xsd The element type is UAVariable.
Seems to be an issue in .NET 5 and .NET 6.
The behaviour where the code works but the document is silently truncated is extremely problematic. If this due to a obscure XML schema rule there should be an exception.
Reproduction Steps
A simple sample project is available.
Expected behavior
Entire document is read when Value is encountered.
Actual behavior
Processing stops when Value is encountered.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response