PRB: When You Generate Managed Classes, the mixed Attribute Is Ignored When the Element Contains the anyAttribute Property (815107)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
SYMPTOMSYou can generate managed classes for XML Schemas by using the XML
Schema Definition Tool (Xsd.exe). However, when you generate managed classes
for an XML Schema that contains the anyAttribute element under the mixed attribute, you may not find
the XmlTextAttribute class as a public member for the generated class.CAUSEThe mixed attribute indicates whether character data is permitted to appear
between the child elements of the complexType element. The default value of mixed is false.
However, when you add anyAttribute to a complex type element that has mixed set to true, the mixed attribute is ignored. WORKAROUNDTo work around this problem, do not use anyAttribute inside
mixed attributes when you want to enter character data between child elements.
For more information about XML Schema design patterns, visit the following
Microsoft Developer Network (MSDN) Web site: STATUS This
behavior is by design.REFERENCES
For additional information about XML Schemas in the Microsoft .NET
Framework, click the following article number to view the article in the Microsoft Knowledge Base:
313826
INFO: Roadmap for XML Schemas in
the .NET Framework
Modification Type: | Major | Last Reviewed: | 9/10/2003 |
---|
Keywords: | kbSchema kbCodeGen kbXML kbprb KB815107 kbAudDeveloper |
---|
|