views:

268

answers:

1

Most Java-XML binding frameworks and code generators need XML Schema Defintions. Can you suggest the best way to generate binding code from DTD.

I know that the XJC in JAXB 2 supports DTD but it is considered experimental.

In the spirit of Stack Overflow, one suggestion per answer please - to be voted up or down instead of duplicated

+2  A: 

Convert the DTD to a schema (lots of online and offline tools available). This step should be lossless. Now use this schema with your favorite Java-XML binding framework and/or code generator that needs schema definitions.

GerG