I need to validate a number of different XML documents against the same
schema, but the behaviour of XmlValidatingReader seems to make this very
expensive in memory terms.
We loaded about 150 XML files via XmlDocument.Load, which took around about
3Mb of allocations, but the XmlValidatingReader added another 69Mb of
allocations during Schema.Add
What would be nice is if you could create a validating reader and assign the
schema and then have it process multiple XML documents; currently the reader
has to be passed in via the constructor so you can't re-use the internal
schema set up that's expensive in memory terms.
Paul