Reading time: 1 – 2 minutes

I’ve used this DTD generator tool a long time ago, but today I had to use it again, so I thought I should put an entry on my blog about it and keep it archived for future reference.
Download the file dtdgen.jar and copy it to your [java_installation]jrelibext (assuming it’s on your classpath)
Test to see if you can run java stuff by opening a command line and running: 

java

You should get some usage example text.
 
Testing Java Install
 
If you do, you’re ready to generate DTD’s.
Copy your XML file to the desired folder and run the following script:
java DTDGenerator "path_to_my_xml_file.xml">"path_to_my_generated_dtd_file.dtd"
DTD Generator Command
 

Share and Enjoy:
  • Twitter
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • del.icio.us
  • Digg
  • Slashdot
  • Technorati
  • Posterous
  • LinkedIn
  • Reddit

2 Responses to “Auto-Generating DTDs”

  1. Dominic says:

    Thanks so much. I’ve been looking for something like this for a long time.

  2. Really glad it helped you! :-)

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>