I have a question about using DTD to validate an XML data feed. Here is what I need to do.
1. I need to retrieve an XML file from a website, say http://ABCD.COM/sample.xml
2. This XML is well formatted per a DTD. This DTD is defined external at the same website. Here is the sample of the XML file:
<?xml version="1.0" encoding="ISO8859-1"?>
<!DOCTYPE index SYSTEM "/dtds/format1.dtd">
3. When I retrieve the XML file(Or after I retrieve the XML file), I need to checked whether it is valid or not per the DTD file.
Any idea ? Sample code would be really appreciated.