Re: Problem with creating classes as runtime - PLEASE HELP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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



.



Relevant Pages

  • Re: Problem with creating classes as runtime - PLEASE HELP
    ... I want to parse an XMLSchema object, create runtime classes to ... The user can then populate the propertyGrid ... file that conforms to the schema I was originally given. ... The reason for the Collection class is for nested elements in the XML ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fwd: Module submission DBIx::DB
    ... > modules, based on XML, DB files, or others. ... some reason putting "Schema" first reads better. ... Prev by Date: ...
    (perl.dbi.users)
  • Re: probably a simple question (I hope)
    ... That does match the structure of the XML I desire. ... However I am still unable to achieve the desired output for some reason. ... My schema is nested. ...
    (microsoft.public.dotnet.general)
  • Extracting schema..
    ... The DataTable xml written out, ... show me how to extract that schema and put it in external file? ... reason for this, is that I want to apply that structure to multiple ...
    (microsoft.public.dotnet.general)
  • Re: how to return xml document from a web service
    ... what specific XML you expect. ... If you have a schema that defines what you expect, ... The second issue with this approach is that XML is not a string. ... >> methods from the wire transport. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)