Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / January 2004

Tip: Looking for answers? Try searching our database.

instantiation of xmlserializer gives me error in [randomname].dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary Brewer - 30 Jan 2004 12:49 GMT
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(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;

}
Daniel Cazzulino - 30 Jan 2004 15:19 GMT
Try Chris Sells tool at:
http://sellsbrothers.com/tools/#XmlSerializerPreCompiler

> Below are my classes generated using XSD.EXE from XML/XSLT
>
[quoted text clipped - 13 lines]
>
> Gary

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]

[System.Xml.Serialization.XmlRootAttribute(Namespace="http://mysite.com/even
> tImportSchema", IsNullable=false)]
>
[quoted text clipped - 5 lines]
>
> }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]
>
[quoted text clipped - 20 lines]
>
> }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]
>
[quoted text clipped - 9 lines]
>
> }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]
>
[quoted text clipped - 9 lines]
>
> }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]
>
[quoted text clipped - 13 lines]
>
> }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> tImportSchema")]
>
[quoted text clipped - 9 lines]
>
> }
Gary Brewer - 30 Jan 2004 15:59 GMT
Thanks, thats a brilliant tool and does the job perfect (well it tells me
whats wrong).

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

> Try Chris Sells tool at:
> http://sellsbrothers.com/tools/#XmlSerializerPreCompiler
[quoted text clipped - 17 lines]
> >
> > Gary

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]

[System.Xml.Serialization.XmlRootAttribute(Namespace="http://mysite.com/even
> > tImportSchema", IsNullable=false)]
> >
[quoted text clipped - 5 lines]
> >
> > }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]
> >
[quoted text clipped - 22 lines]
> >
> > }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]
> >
[quoted text clipped - 9 lines]
> >
> > }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]
> >
[quoted text clipped - 9 lines]
> >
> > }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]
> >
[quoted text clipped - 13 lines]
> >
> > }

[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://mysite.com/even
> > tImportSchema")]
> >
[quoted text clipped - 9 lines]
> >
> > }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.