-
Notifications
You must be signed in to change notification settings - Fork 48
FAQs
Any commonly encountered issues and/or questions arising from reported issues will make their way here.
What is ExtendedXmlSerializer designed to do?
The primary vision and purpose of ExtendedXMLSerializer is to serialize a .NET object graph into an XML document, and then be able to read (deserialize) back into memory using the same documents created with it.
You can consider this serializer a standalone hybrid that sits somewhere betweeen the classic System.Xml.XmlSerializer
and the powerful System.Xaml
serializer.
The one area we seem to get a lot of issues is around the classical serializer vs. the ExtendedXmlSerializer. Here are some questions that dive into the area.
I can do xyz with the classic System.Xml.XmlSerializer
. Can I do the same with ExtendedXmlSerializer?
You Should.™ The primary intended purpose of ExtendedXMLSerializer is to work with .NET object graphs, not to parse XML documents, manipulate an XML document model, or to work with legacy XML functionality.
That stated, we do support a lot of classic functionality, but it isn't a focus. There is a lot to be desired about how the classic serializer handles .NET object graphs and subsequent activation. Rectifying these rough spots was the main motivation behind ExtendedXMLSerializer.
If you would like to talk about support of a classic feature that does not appear to be supported, please do a search through our issues list first, and if it has not been discussed, open a new issue and we'll meet you there. 👍
I have documents that were serialized with the classic System.Xml.XmlSerializer
. Can they be read with ExtendedXMLSerializer?
Typically, yes. But some features are not supported -- either because they have not yet been brought to our attention or we cannot due to current designs. For instance, lists serialized with an element name configured via the ElementAttributeAttribute
that result in implicit content (that is, do not explicitly state the property name in the document) don't do so well with ExtendedXmlSerializer. XmlTextAttribute
also gets a little grumpy.
If you find that you run into an incompatibility, our recommendation is to:
- Serialize the graph using ExtendedXmlSerializer to see what the expected XML should look like.
- Create an XSLT transformation to transform the classically-serialized XML document.
- Run classic-serialized document through XSLT to create the ExtendedXmlSerializer-friendly document.
It would seem you focused on serializing .NET object graphs and not on preserving classic legacy functionality.
That's exactly what we did. :) Along the way, we introduced a highly adaptable extension model to boot. In fact, most issues submitted to our repository are solved by way of adding a new extension.
I would like a legacy feature that is not currently supported with ExtendedXMLSerializer. Can I submit a PR for this feature?
Yes. :) We certainly welcome any PRs for our project, having to do with implementing missing legacy functionality and/or otherwise. Feel free to fire one up and we will meet you there. 👍
ConfigurationContainer
TypeConfiguration
MemberConfiguration
ISerializerExtension
IContents
ISerializer
IConverter
IElement