I need to parse a complex and large (100 MB+) XML file. Fortunately I have XML Schema definitions, but unfortunately I can not use xsd2code to generate an automatic XML deserialization, because there are abstract message types used on the top level of the XML. The structure of the XML file is like this:
<Head>
<Batch>
<Dog></Dog>
<Dog></Dog>
</Batch>
</Head>
The xsd defines batch to contain abstract animals, not dog. Xsd2Code can create the Dog class with the right XML attributes, but the dog class is inside another xsd file.
I tried to paste all xsd together, but this did not help to fix this.
Is there a good way like Linq to XML or Xpath to loop over the elements in Batch and create Dog instances without needing to parse Dog manually?