I'm looking for a program which can create a DTD file from an XML.

xmlSpy can do this but it does a lot more as well and the £350 price tag is a bit off-putting.