I have a Java application. How can I generate a DTD from a Java class? I don't know how to do that.
Asked
Active
Viewed 227 times
1 Answers
2
First of all you would not use DTDs any more.
I assume you are using a serialize framework like JAXB. As a part of the jaxb distribution is schemagen. With schemagen you can create xsd file for your classes.
Have a look at this:

Marcinek
- 2,144
- 1
- 19
- 25
-
No, I don't use JAXB, my app without framework so how can I generate DTD from this? any idea plz? – Nina PRO Jan 12 '16 at 10:07
-
Use Jaxb, or its schemagen, to generate the schema files. You can how ever then generate dtd from xsd. – Marcinek Jan 12 '16 at 10:08