XML not loaded, without errors

Apr 12, 2011 at 10:32 AM

I used xsd2code in vb.net project, on an XSD.Exe generated xsd. I wanted to move my XML code to a C# dll.

I tried to regenerate the source code (I'm not sure I'm using the same xsd than before, or a new generated one). After setting the right XmlRootAttribute, I can use LoadFromFile, but nothing is loaded. I get an empty object.

I can't find what I have done wrong... How can I debug this thing ?

May 12, 2011 at 10:23 AM

I had the exact same problem using version of the utility.  When I set the GenerateXmlAttributes property to true when generating my class, the utility worked much better.

May 19, 2011 at 8:12 PM

Please try xsd2Code 3.5Beta and set GenerateOderAttribute to false.



May 20, 2011 at 2:50 AM

KingJ's solution worked.

I'll try the beta sometimes, but I already lost too much time on juste this code move :)

May 21, 2011 at 9:59 AM
Edited May 22, 2011 at 6:48 AM

So, I was in fact missing an element (its value was never read...)

I installed the 3.5 Beta, check that GenerateOderAttribute was set to false, and it worked perfectly !

(EDITED : minor problem was my problem :) )