Groups | Blog | Home
all groups > dotnet xml > november 2003 >

dotnet xml : Converting a DTD into csharp objects



andy NO[at]SPAM encomia.com
11/26/2003 6:49:35 PM
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.

ruby_user
11/26/2003 9:00:43 PM
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?

[quoted text, click to view]

Christoph Schittko [MVP]
11/28/2003 7:45:58 PM
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.

--
HTH
Christoph Schittko [MVP, XmlInsider]
Software Architect, .NET Mentor

[0] http://www.gotdotnet.com/team/xmltools/

[quoted text, click to view]

Dave Marteinson
11/28/2003 8:34:52 PM

[quoted text, click to view]

Andrew,

Hrm, how about using something like dtd2schema to create a schema
from the DTD then using SOM to read the schema?

Regards,

-djm

AddThis Social Bookmark Button