I am working with existing code and hoping to change data without recompiling (as such this could be seen as a SuperUser issue).
We currently DataSet.ReadXml from a (compiled) resources-based XML file. Then we check for a local XML file and, if present, DataSet.ReadXml that file and then DataSet.Merge the result into the original.
Seeing as we have no schema in the compiled resources-based XML, there is no way for the external XML to override any data, only add to it, yes?
My question title may have seemed to preclude this option, but it wasn’t intended:
You can get the local file’s data to override the compiled file, by including the
xs:schemaas the first sub-element of the XML.I.e. when the original data has no schema, the merged schema will be used.
E.g.
Original:
New:
Merged (for simplicity I include the WriteXml output):