I have an XML file which has a DTD of its own. Within this XML file an ENTITY is declared which references another XML file which also has a DTD. Now when I try to open the first XML file it gives an error that 2 DTDs can't exist. What should I do?
Normal! You ask to your XML parser to validate the XML document with DTDs but the URL of DTDs should be not accessible by the parser. 2 choices: -not validate the XML data (a parser option) , the XML data is just well formed -be able to make the DTDs accessible by the parser with a HTTP server (like http://www.w3.org/XML/1998/06/xmlspec-v21.dtd) or with the file system ( like ./myDTDs/DTD1.dtd ) but with this way you need to be careful of the real location of the file. Don't forget that the future is XML Shema ... if U could , use shema . It is more complicated but type-checked. ------------------ --------- Guillaume