* xmlLoadExternalEntity: * @URL: the URL for the entity to load * @ID: the Public ID for the entity to load * @ctxt: the context in which the entity is called or NULL * * @URL is a filename or URL. If if contains the substring "://", * it is assumed to be a Legacy Extended IRI. Otherwise, it is * treated as a filesystem path. * * @ID is an optional XML public ID, typically from a docty
| 2249 | * Returns the xmlParserInputPtr or NULL |
| 2250 | */ |
| 2251 | xmlParserInputPtr |
| 2252 | xmlLoadExternalEntity(const char *URL, const char *ID, |
| 2253 | xmlParserCtxtPtr ctxt) { |
| 2254 | char *canonicFilename; |
| 2255 | xmlParserInputPtr ret; |
| 2256 | |
| 2257 | if (URL == NULL) |
| 2258 | return(NULL); |
| 2259 | |
| 2260 | canonicFilename = (char *) xmlCanonicPath((const xmlChar *) URL); |
| 2261 | if (canonicFilename == NULL) { |
| 2262 | xmlCtxtErrMemory(ctxt); |
| 2263 | return(NULL); |
| 2264 | } |
| 2265 | |
| 2266 | ret = xmlCurrentExternalEntityLoader(canonicFilename, ID, ctxt); |
| 2267 | xmlFree(canonicFilename); |
| 2268 | return(ret); |
| 2269 | } |
| 2270 | |
| 2271 | /************************************************************************ |
| 2272 | * * |
no test coverage detected