[xml] Re: Sax and Dtd's

my path-change-function looks like this:

xmlParserInputPtr xmlMyExternalEntityLoader(const char *URL, const char
*ID,xmlParserCtxtPtr ctxt)
 static char DTDURL[] =  "./dtd/xyz.dtd";
    xmlParserInputPtr ret;
    const char *fileID = NULL;

    ret = xmlNewInputFromFile(ctxt, fileID);
    if (ret != NULL) {
 } else if(strstr(URL,"xyz.dtd")) {

    if (defaultLoader != NULL) ret = defaultLoader(DTDURL, ID, ctxt);
 } else if (defaultLoader != NULL) ret = defaultLoader(URL, ID, ctxt);


ok it works with the dom parser, but if i use it with the xmltextreader i

./dtd/xyz.dtd:3: I/O error : failed to load external entity "(null)"

?! so what's the difference?!


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