devlooped/NuDoq

Add support for custom attributes in XmlVisitor

Closed this issue · 0 comments

kzu commented

Currently, even though the model supports preserving the attributes when reading, the XmlVisitor completely ignores them when writing.

Without targeting full round-tripping of the XML document, we could still improve the situation if we made is so the typed properties in the model where just pass-though accessors to the original Attributes dictionary, thereby supporting custom attributes while at the same time keeping the dictionary in sync with the typed properties when mutating the model.

This would probably also simplify the XML visitor, since it would just need to write out all attributes, rather than special-casing for each element type.