Hi. How can I validate an XML document against a DTD file which only my application knows about. So that the XML document which should be validated does not contain the DOCTYPE declaration which specifies the .dtd file. I need this in Java. Here is an example: The xml file to be validated:
<?xml version = "1.0" ?>
<Employee>
<Emp_Id> E-001 </Emp_Id>
<Emp_Name> Vinod </Emp_Name>
<Emp_E-mail> [email protected] </Emp_E-mail>
</Employee>
The .dtd file from my application:
<!ELEMENT Employee (Emp_Id, Emp_Name, Emp_E-mail)>
<!ELEMENT Emp_Id (#PCDATA)>
<!ELEMENT Emp_Name (#PCDATA)>
<!ELEMENT Emp_E-mail (#PCDATA)>