VB.NET XML Deserialization - can't get at some of the values

VB.NET XML Deserialization - can't get at some of the values

Post by nat » Fri, 23 Nov 2007 12:59:53



OK, this is just getting too frustrating. My XML file is based on 2
XSDs. The first XSD has general info elements in it, the second has
all the details in it. I've generated the VB class based on the 2 XSDs
using the .NET 2005 tool. But for some reason, when I deserialize an
XML file based on those 2 XSDs, I can only get at the general info,
not the details! I checked the VB class that was generated (actually
several classes were generated in the file), and I can't see anything
missing in it or wrong with it. Can someone point me in the right
direction or to a book that might help me figure out why I can't get
at those details? All the sample code I've seen on the internet only
uses one XSD, not 2 or more. Someone please help, I've been working on
this for 2 days now :(
 
 
 

VB.NET XML Deserialization - can't get at some of the values

Post by Andrew Bader » Sat, 24 Nov 2007 03:53:51


The class(es) involved have default parameterless constructors? All
properties have get and set accessors?

--Andrew Badera


Quote:

> OK, this is just getting too frustrating. My XML file is based on 2
> XSDs. The first XSD has general info elements in it, the second has
> all the details in it. I've generated the VB class based on the 2 XSDs
> using the .NET 2005 tool. But for some reason, when I deserialize an
> XML file based on those 2 XSDs, I can only get at the general info,
> not the details! I checked the VB class that was generated (actually
> several classes were generated in the file), and I can't see anything
> missing in it or wrong with it. Can someone point me in the right
> direction or to a book that might help me figure out why I can't get
> at those details? All the sample code I've seen on the internet only
> uses one XSD, not 2 or more. Someone please help, I've been working on
> this for 2 days now :(


 
 
 

VB.NET XML Deserialization - can't get at some of the values

Post by Charles A. Lope » Sat, 24 Nov 2007 05:05:52


i assume you're talking about databases.

Please confirm my assumption.

Tell us the details of thet XSD file.

What information are you receiving when you deserialize?

Do you have the Data Dictionary? Schema?


Quote:

> OK, this is just getting too frustrating. My XML file is based on 2
> XSDs. The first XSD has general info elements in it, the second has
> all the details in it. I've generated the VB class based on the 2 XSDs
> using the .NET 2005 tool. But for some reason, when I deserialize an
> XML file based on those 2 XSDs, I can only get at the general info,
> not the details! I checked the VB class that was generated (actually
> several classes were generated in the file), and I can't see anything
> missing in it or wrong with it. Can someone point me in the right
> direction or to a book that might help me figure out why I can't get
> at those details? All the sample code I've seen on the internet only
> uses one XSD, not 2 or more. Someone please help, I've been working on
> this for 2 days now :(

--
Charles A. Lopez

Start your career with Charles A. Lopez TECHNOLOGY - Send your resume to

http://cs.nyu.edu/web/People/alumni.html

 
 
 

VB.NET XML Deserialization - can't get at some of the values

Post by nat » Sat, 24 Nov 2007 11:28:53


Thanks everyone for your replies!

I found out today the input XML file I was trying to deserialize had
the namespace declared in the wrong spot, so there was no way I could
have read the info I needed from that file. I was given a new XML file
that now works.