Is there a quick and easy way to convert a DTD into C# objects /
interfaces?
I realize this can be done with schema, but I have been given the
DTD's as a requirement.
Thank you.
ruby_user - 27 Nov 2003 05:00 GMT
I am not aware of any quick way express a DTD in an object model. The
important question is what you expect the C# objects to do / what do you
need to use them for?
> Is there a quick and easy way to convert a DTD into C# objects /
> interfaces?
[quoted text clipped - 3 lines]
>
> Thank you.
Dave Marteinson - 28 Nov 2003 20:34 GMT
> Is there a quick and easy way to convert a DTD into C# objects /
> interfaces?
Andrew,
Hrm, how about using something like dtd2schema to create a schema
from the DTD then using SOM to read the schema?
Regards,
-djm
Christoph Schittko [MVP] - 29 Nov 2003 01:45 GMT
There's currently nothing in the .NET Framework to generate objects from the
definitions in a DTD. If you can convert the DTD to XML Schema with XmlSpy
for example ) then you can use either xsd.exe, which is part of the .NET
Framework or the Xml Inference Tool from GDN [0] to generate C# of VB.NET
classes.

Signature
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor
[0] http://www.gotdotnet.com/team/xmltools/
> Is there a quick and easy way to convert a DTD into C# objects /
> interfaces?
[quoted text clipped - 3 lines]
>
> Thank you.