Below are my classes generated using XSD.EXE from XML/XSLT
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(Namespac e="http://mysite.com/even
tImportSchema")]
[System.Xml.Serialization.XmlRootAttribute(Namespac e="http://mysite.com/even
tImportSchema", IsNullable=false)]
public class events {
[System.Xml.Serialization.XmlElementAttribute("even t")]
public eventsEvent[] Items;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="http://mysite.com/even
tImportSchema")]
public class eventsEvent {
public string date;
public string title;
public string venue;
[System.Xml.Serialization.XmlElementAttribute("even tType", IsNullable=true)]
public eventsEventEventType[] eventType;
[System.Xml.Serialization.XmlElementAttribute("orgA bout", IsNullable=true)]
public eventsEventOrgAbout[] orgAbout;
[System.Xml.Serialization.XmlArrayItemAttribute("me dia",
typeof(eventsEventMediasMedia), IsNullable=false)]
public eventsEventMediasMedia[][] medias;
}
[System.Xml.Serialization.XmlTypeAttribute(Namespac e="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(Namespac e="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(Namespac e="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(Namespac e="http://mysite.com/even
tImportSchema")]
public class eventsEventOrgAbout {
[System.Xml.Serialization.XmlAttributeAttribute()]
public string ID;
[System.Xml.Serialization.XmlTextAttribute()]
public string Value;
}