It seems every time I use an XMLReader, I end up with a bunch of trial and error trying to figure out what I\'m about to read versus what I\'m reading versus what I just rea
Here's the thing... I've written a fair amount of serialization code (including a lot of xml processing), and I find myself in exactly the same boat as you. I have a very simple piece of guidance, therefore: don't.
I'll happily use XmlWriter
as a way to write xml quickly, but I'd walk over hot coals before choosing to implement IXmlSerializable
another time - I'd simply write a separate DTO
and map the data into that; it also means the schema (for "mex", "wsdl", etc) comes for free.