2

I am working with serialization using data contracts and want to add a version number(schema version number in my case) and a check for the same on the very root node of my serialized document.

Something like this :

<ReportDocFormat version="1.0.2">
    <FirstNode>
    ...

Further, I wan't to use this version number to decide whether or not to deserialize that document for that schema.

I have searched through the specification and on other sites but I can't find any possible ways to do it. Is there any way to achieve this ?

Jasmeet
  • 1,121
  • 6
  • 17
  • Is this what you are looking for: https://stackoverflow.com/questions/12007079/resolving-which-version-of-an-xml-schema-to-use-for-xml-documents-with-a-version ? – o_weisman Jan 03 '19 at 06:40
  • @o_weisman The working of 'VersionAttribute' in mentioned question at [link](https://stackoverflow.com/questions/12007079/resolving-which-version-of-an-xml-schema-to-use-for-xml-documents-with-a-version) is kind of similar I want to have. – Jasmeet Jan 03 '19 at 06:47

0 Answers0