Re: Problem with creating classes as runtime - PLEASE HELP
- From: "Marc Gravell" <marc.gravell@xxxxxxxxx>
- Date: Fri, 11 May 2007 08:55:28 +0100
One other off-the-wall thought... perhaps another pragmatic approach
here is to use "xsd.exe" to parse the schema, and then use "csc.exe"
to compile the resultant class/dataset to a temp assembly... load it
and then treat as before. I will use Reflection.Emit when pushed, but
I try to look at simpler solutions first, because my debugging time is
valuable to me, and I know my limitations; I'm an IL dabbler - not an
expect.
csc is part of the runtime, but unfortunately xsd is part of Visual
Studio and isn't listed in redist.txt, so not sure how you'd stand re
using it off your dev box...
<julia_beresford@xxxxxxxxxxx> wrote in message
news:1178866382.424065.24050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ok...
Thanks for your reply and all the info, Generics looks interesting,
i'll look into that. Also i'll look into IL generated in release
mode
- just for my own better understanding if nothing else!!! Hopefully
something you've suggested will allow me to move forward.
Just for your information the reason I want to do this is as
follows...
I want to parse an XMLSchema object, create runtime classes to
represent the data and set a propertyGrid control's SelectedObject
to
an instance of the class. The user can then populate the
propertyGrid
with data. Then I can serialize the runtime class to create my XML
file that conforms to the schema I was originally given.
The reason for the Collection class is for nested elements in the
XML
schema. I've had some success, but please, if you think this is
just
crazy, or if you can suggest a better way to do this, please say.
I'm
always ready to listen to better ways of doing stuff!
Many thanks
Julia
.
- Follow-Ups:
- Re: Problem with creating classes as runtime - PLEASE HELP
- From: julia_beresford
- Re: Problem with creating classes as runtime - PLEASE HELP
- References:
- Problem with creating classes as runtime - PLEASE HELP
- From: julia_beresford
- Re: Problem with creating classes as runtime - PLEASE HELP
- From: Marc Gravell
- Re: Problem with creating classes as runtime - PLEASE HELP
- From: julia_beresford
- Problem with creating classes as runtime - PLEASE HELP
- Prev by Date: Re: How to use generics?
- Next by Date: Re: Decimal seperator
- Previous by thread: Re: Problem with creating classes as runtime - PLEASE HELP
- Next by thread: Re: Problem with creating classes as runtime - PLEASE HELP
- Index(es):
Relevant Pages
|