I don't know if xsd:list is supported, I haven't used it.
one way to approach this may be to XmlIgnore the actual array of types.
this will prevent the "incorrect serialization" you described previously.
Then add a "shadow member" that helps you serialize the way you want. Make
this member a string. It should have the name specified in your XSD - eg,
Types. You will need a getter and a setter, but the setter should be a
no-op. The getter should examine the array of XmlQualifiedNames and then
build a space-delimited-string that represents the list.
Does this work?
eg
[XmlIgnore]
XmlQualifiedName[] m_Types;
public String Types{
set {
}
get {
String s;
foreach(XmlQualifiedName xqn in m_Types) {.... } // build string
here
return s;
}
}
"ma***@nospam.com" <an*******@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Here is the xsd for the list of qnames. The result should be an object
called Probe with a member Types that is an array of XmlQualifiedName.
Instead it is simply a single XmlQualifiedName. Also the serializer does
not seem to know how to serialize a list in the space delimited manner that
is required. Incidentally if you make the xsd list an attribute instead of
the element contents it does serialize as a list. This is interesting but
doesn't help me.
<xs:element name='Probe' ><xs:complexType><xs:sequence><xs:element
ref='tns:Types' minOccurs='0'
/></xs:sequence></xs:complexType></xs:element><!-- Shared global
elements --><xs:element name='Types' type='tns:qnlist' /><xs:simpleType
name="qnlist"><xs:list itemType='xs:QName' /></xs:simpleType>