When I do
XmlSerializer xmls=new XmlSerializer(typeof(events[]));
I get
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in
mscorlib.dll
Additional information: File or assembly name d4xnc6_9.dll, or one of its
dependencies, was not found.
(The DLL name is random), the class' are below.
Gary
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://mysite.com/even
tImportSchema", IsNullable=false)]
public class events {
[System.Xml.Serialization.XmlElementAttribute("event")]
public eventsEvent[] Items;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
public class eventsEvent {
public string date;
public string title;
public string venue;
[System.Xml.Serialization.XmlElementAttribute("eventType", IsNullable=true)]
public eventsEventEventType[] eventType;
[System.Xml.Serialization.XmlElementAttribute("orgAbout", IsNullable=true)]
public eventsEventOrgAbout[] orgAbout;
[System.Xml.Serialization.XmlArrayItemAttribute("media",
typeof(eventsEventMediasMedia), IsNullable=false)]
public eventsEventMediasMedia[][] medias;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
public class eventsEventEventType {
[System.Xml.Serialization.XmlAttributeAttribute()]
public string ID;
[System.Xml.Serialization.XmlTextAttribute()]
public string Value;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
public class eventsEventMediasMediaType {
[System.Xml.Serialization.XmlAttributeAttribute()]
public string ID;
[System.Xml.Serialization.XmlTextAttribute()]
public string Value;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
public class eventsEventMediasMedia {
public string url;
public string access;
public string password;
public string content;
[System.Xml.Serialization.XmlElementAttribute("type", IsNullable=true)]
public eventsEventMediasMediaType[] type;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
tImportSchema")]
public class eventsEventOrgAbout {
[System.Xml.Serialization.XmlAttributeAttribute()]
public string ID;
[System.Xml.Serialization.XmlTextAttribute()]
public string Value;
}
"Gary Brewer" <ga...@nospam.com> wrote in message
news:%23TeWB%23y5DH...@TK2MSFTNGP09.phx.gbl...
XSD.EXE converts XML into XSD files into class files, which is a great
feature but I would have thought that using this tool and using
serialisation would go hand in hand.
The fact that I cannot deserialise something into my generated class is
slightly annoying (an the error message in VS.NET is even more crazy!)
Will this be fixed in a new version or is there a reason for this?
Thanks,
Gary Brewer
"Daniel Cazzulino" <kz...@INVALIDaspnet2.com> wrote in message
news:%23rLwwR0...@TK2MSFTNGP09.phx.gbl...