[xml] alternate DTD locations



Hi,

Is is possible to specify a search path for external entities when using the xmlreader interface?

Alternatively, is it possible to specify a DTD to fall back on if the one specified in the XML file isn't found (again with xmlreader). E.g. it is possible to set a schema with xmlTextReaderSetSchema but I don't see a DTD equivalent.

Background:

I am working on a tool which takes its input from xml files which specify a dtd in the system identifier. Currently I have to make several copies of the DTDs into whichever directory the input is being read from. I want to be able to specify where the DTDs are stored as a configuration option, or possibly derive it from where the executable has been installed. Ideally, I want to be able to specify something like an include directory which acts as a base for the URIs in the system identifier.

Thanks for any help or suggestions,

Paul



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]