How can I validate an XML file against a DTD without including the DTD file in the XML file?

Arun Bharathan

As per the XML1.0 specification the DTD could be declared inside the XML, or externally as a seperate URI or combination of both.

So you would have a processing Instruction inside XML as follows:

<!DOCTYPE myelement SYSTEM "http://www.myserver.com/dtds/myelement.dtd" >
Read the XML1.0 Specification for more details.