We help IT Professionals succeed at work.

Can i use XSD.exe or XSDObjectGen to generate a class library from a DTD? And if so which is best?

paulCardiff
paulCardiff asked
on
I've got the following DTD i.e. http://www.clickatell.com/downloads/xml_dtd.txt that i want to generate serialised xml from in order to post to a URL

Can i use XSD.exe or XSDObjectGen to generate a class library from this DTD? And if so which is best?

Code Samples would be much appreciated

Thanks
P
Comment
Watch Question

Commented:
I'm confused...  you want to convert the DTD file to XML so that you can "post to a URL"?

What's that got to do with creating a class library from the DTD?

There are a few command-line tools (and some web services) that can covert between the two formats (DTD<->XSD), but I don't know of any programmatic way to perform the conversion

Author

Commented:
I want to generate a class library from the DTD - and I'm just trying to establish whether or not this is possible and what is the best way to go about it
Commented:
Not directly... I think you'd have to convert the DTD into an XSD file first, then use Visual Studio (or the xsd.exe command line) to convert it into source code that can be used to create the class .

http://www.google.com/search?q=DTD+convert+XSD
Forced accept.

Computer101
EE Admin