BUG: XML serialization incorrectly processes MaxOccurs="0" (319922)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework) 1.0
- Microsoft ADO.NET (included with the .NET Framework 1.1)
- Microsoft .NET Framework Class Libraries 1.0
- Microsoft .NET Framework Class Libraries 1.1
This article was previously published under Q319922 SYMPTOMS You can use the XML Schema Definition Tool (Xsd.exe) to
generate the common language runtime classes from an XML schema. When you do
so, elements that have the maxOccurs attribute with a value of "0" is supposed to be ignored. However, they may be included in the
classes that are generated. When you generate the corresponding DataSet classes, the element is generated as a column.
The DataSet.ReadXmlSchema method also incorrectly interprets the XML schema when the schema
contains elements that have maxOccurs="0". This means that the DataSet.ReadXmlSchema method does not ignore those elements. CAUSE If an element has maxOccurs="0", the correct interpretation from a relational view is "this
column does not exist". But the element is not ignored and included in the
runtime class that is generated or the DataSet class. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
REFERENCES For more information about the XML Schema Definition Tool
and XML Serialization, visit the following Microsoft Web sites: For additional information,
click the article number below to view the article in the Microsoft Knowledge
Base: 314150 INFO: Roadmap for XML Serialization in the .NET Framework
Modification Type: | Minor | Last Reviewed: | 3/9/2006 |
---|
Keywords: | kbtshoot kbbug kbenv kbpending KB319922 kbAudDeveloper |
---|
|