PC Review


Reply
Thread Tools Rate Thread

A bug in xsd.exe and XMLSerialization

 
 
Grace
Guest
Posts: n/a
 
      9th Jan 2004
Dear,

I have used xsd.exe tool to generate a class from a
schema. Then I used XMLSerializer to deserialize an xml
file using that class, changed some values, and serialized
it back to a new xml file.

Error occurs here, the new file has some attribute missing
which I have not changed anything about it.

The missing attribute in the original schema is defined
like this:
<xsd:attribute name="country" type="xsd:NMTOKEN"
fixed="US" />

because of the error occured, I changed the schema into
the following:
<xsd:attribute name="country" type="xsd:NMTOKEN"
use="required" />

Then it works! With no missing attribute!

Can anybody know about this bug? And how to fix it?

Regards,
Grace
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLSerialization eBob.com Microsoft VB .NET 0 12th Aug 2008 06:23 PM
XmlSerialization Storage= =?Utf-8?B?SWFuIEt1bG1hdHlja2k=?= Microsoft Dot NET 0 12th Jul 2006 06:43 PM
XmlSerialization over a NetworkStream Curious Microsoft C# .NET 2 23rd Nov 2005 03:10 PM
XmlSerialization Lloyd Dupont Microsoft Dot NET Framework 1 14th Jun 2005 02:45 AM
XmlSerialization george r smith Microsoft C# .NET 1 2nd Apr 2004 10:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 PM.