Java Technology & XML - is DOCTYPE Declaration in DTD possible ?

Is <!DOCTYPE tag is possible in DTD file ?.Please let me know the place where can i get more info about DTD ?.I have some DTD file, i wan to check using JavaAPI whether my DTDs are valid.
[211 byte] By [proveindiaa] at [2007-11-26 23:13:54]
# 1

There aren't any Java API's that I know of that simply validate a DTD by itself. Most DOM parsers have an option to validate a given document against a DTD. Presumably, this validation will fail or at least report a message in your console if the DTD it is validating against is invalid.

http://www.w3schools.com/dtd/dtd_intro.asp

- Saish

Saisha at 2007-7-10 14:12:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

I have a DTD file looks like below

<!ELEMENT note (to,from,heading,body)>

<!ELEMENT to (#PCDATA)>

<!ELEMENT from (#PCDATA)>

<!ELEMENT heading (#PCDATA)>

<!ELEMENT body (#PCDATA)>

I want to know whether this DTD file is well formed or not.

I am not using any XML file. I need to prepare and verify my external DTD file.

proveindiaa at 2007-7-10 14:12:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
is there any API in java to find out whether given Document is XML or DTD ?. Thanks in Advance.
proveindiaa at 2007-7-10 14:12:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
A quick Google search turned up dozens of open source solutions for DTD parsing. http://www.google.com/search?hl=en&q=Java+DTD+parser- Saish
Saisha at 2007-7-10 14:12:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...