Deserialize XML Document Where XSD Schema uses "xs:include"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stuart Rivenbar
    New Member
    • Jun 2011
    • 2

    Deserialize XML Document Where XSD Schema uses "xs:include"

    I have attached the XML and XSD files below after my description in a ZIP file, as well as the three XSD include files.

    I am trying to deserialize the XML and get the error:

    System.InvalidO perationExcepti on: There is an error in XML document (1, 40). --> System.InvalidO perationExcepti on: <CURRENT-TRMS xmlns=''> was not expected.

    I have read other articles that lead me to believe this was a namespace issue, but I believe it has something to do with the "xs:include ". When the XSD does not use "included" content, and I remove the XML nodes that reference these "xs:include " elements, all works well.

    However, both Altova XMLSpy and Visual Studio 2010 XML Schema Explorer have no complaints with "include".

    Is it possible that the Deserialize method of the XmlSerializer class does not know how to handle "xs:include " ?

    Any help is greatly appreciated.
    Attached Files
  • Stuart Rivenbar
    New Member
    • Jun 2011
    • 2

    #2
    I have figured out the problem to this post. I was pointing to the wrong node. "xs:include " is handled correctly by Deserialize

    Comment

    Working...