>can u help guys how to make a code in converting the DTD to schema using java code?
If someone posted a one-liner asking how he could go about climbing Everest using an ice-axe, I would conclude that he wasn't experienced enough to attempt the task.
If you don't know how to start this job, then don't attempt it. Apart from anything else, it's been done many times before, there are plenty of utilities around to do this kind of thing in IDEs such as Stylus Studio.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference