Hi All,
I am parsing and/or merging an xml file document/s. The xml documents could be of DTD or schema type. I got the parsing part working. While reading the xml file, I want to use different entity parser based on the document type. If the xml file is DTD type document, then I want to use EntityResolverA and if the xml file is XML Schema type, then I want to use the EntityResolverB. How can we find the xml file type before invoking/using the parser or before calling the entity resolver? I do not want to pass in additional parameters in the command prompt to identify the xml file is of type DTD or schema. I am using JDK 5.0 which is using Xerces 2.6.2. Thanks, Sivakumar