XmlSchemaComplexType IsMixed property shows false always

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello all,
I need help if finding out whether a complex type in Schema has mixed content. I am using C# and LINQ, .NET 3.5
Suppose in my XML Schema, I have,
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; element <span style="color:Red; name<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; paragraph<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; complexType <span style="color:Red; mixed<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; true<span style="color:Black; "<span style="color:Blue; >
....
<span style="color:Blue; </<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; complexType<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xs<span style="color:Blue; :<span style="color:#A31515; element<span style="color:Blue; >
[/code]
I validate the instance document to generate the post validation schema infoset, and use the following line to determine if an element is a complex type:
<div style="color:Black;background-color:White; <pre>
XmlSchemaType schemaType =
element.GetSchemaInfo().SchemaType.BaseXmlSchemaType <span style="color:Blue; as XmlSchemaComplexType;
[/code]
Now, schemaType is not null when the element is a complex type.
But, then shouldnt the following statement return true if the complex type has mixed content? However, this always returns a false, why is this happening?
<div style="color:Black;background-color:White; <pre>
schemaType.IsMixed<br/>
[/code]
Thanks for your time in advance,
Greets,

View the full article
 
Back
Top