I have generated C# code from an XSD which contains extensions of another XSD. (the extensions are additions to the original railML 2.4 definition)
The extensions are supposed to be added to the "AnyElement" list of the object defined in the original definition, however adding the element directly to this list results in a type mismatch: "cannot convert from LiquidXmlObjects.norextension.Nor.LineSectionElm" to "System.Xml.Linq.XElement".
I already have C# classes created from the XSD for LineSectionElm, and I would prefer to use this generated structure instead of building an XElement myself.
Are there any easy ways to handle this without building the XElement manually?