-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Closed
Copy link
Description
Description
- XmlDeserializer incorrectly flattens nested lists by using Descendants() which includes elements at all depths, causing deeply nested items to be included in parent collections
- RootElement selection fails when XML contains duplicate element names at different nesting levels, throwing InvalidOperationException or selecting wrong element
- RemoveNamespace() processing includes null values causing potential issues, and unnecessary null-forgiving operators reduce code safety
Deliverables
- Fix list handling: Modify HandleListDerivative to detect container elements and use Elements() for direct children only, with Descendants() as fallback for backward compatibility
- Fix RootElement: Implement shallowest-match preference by trying Element() first, then DescendantsAndSelf() ordered by ancestor count
- Improve robustness: Filter null values in RemoveNamespace, remove null-forgiving operators, add validation for generic type names in XML element names
- Add test coverage: Create comprehensive test suite covering nested lists, duplicate element names, and complex nesting scenarios
Metadata
Metadata
Assignees
Labels
No labels