From 47cbb6bb3cab97008e9c058e7a78c781397b94d8 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Mon, 10 Jun 2024 14:04:00 +0200 Subject: [PATCH] doc: Don't mention xmlNewInputURL --- parser.c | 7 +------ parserInternals.c | 52 +++++++++++++++++++---------------------------- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/parser.c b/parser.c index 5f1fdcfa..711d44d5 100644 --- a/parser.c +++ b/parser.c @@ -2530,9 +2530,6 @@ xmlPopInput(xmlParserCtxtPtr ctxt) { * * Push an input stream onto the stack. * - * This makes the parser use an input returned from advanced functions - * like xmlNewInputURL or xmlNewInputMemory. - * * Returns -1 in case of error or the index in the input stack */ int @@ -12605,7 +12602,7 @@ xmlParseEntity(const char *filename) { * @ID: the entity PUBLIC ID * @base: a possible base for the target URI * - * DEPRECATED: Use xmlNewInputURL. + * DEPRECATED: Don't use. * * Create a parser context for an external entity * Automatic support for ZLIB/Compress compressed document is provided @@ -13938,8 +13935,6 @@ xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar *str, * Parse an XML file from the filesystem, the network or a user-defined * resource loader. * - * See xmlNewInputURL and xmlCtxtUseOptions for details. - * * Returns the resulting document tree */ xmlDocPtr diff --git a/parserInternals.c b/parserInternals.c index 6a43cc8f..423467e6 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1536,37 +1536,6 @@ xmlNewInputStream(xmlParserCtxtPtr ctxt) { * Creates a new parser input from the filesystem, the network or * a user-defined resource loader. * - * @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. - * - * @publicId is an optional XML public ID, typically from a doctype - * declaration. It is used for catalog lookups. - * - * If @encoding is specified, it will override any encodings found - * in XML declarations, text declarations, BOMs, etc. Pass NULL - * for auto-detection. - * - * The following resource loaders will be called if they were - * registered (in order of precedence): - * - * - the global external entity loader set with - * xmlSetExternalEntityLoader - * - the per-thread xmlParserInputBufferCreateFilenameFunc set with - * xmlParserInputBufferCreateFilenameDefault - * - the default loader which will return - * - the result from a matching global input callback set with - * xmlRegisterInputCallbacks - * - a HTTP resource if support is compiled in. - * - a file opened from the filesystem, with automatic detection - * of compressed files if support is compiled in. - * - * The returned input can be passed to xmlCtxtParseDocument or - * htmlCtxtParseDocument. - * - * This function should not be invoked from user-defined resource - * loaders to avoid infinite loops. - * * Returns a new parser input. */ xmlParserInputPtr @@ -2234,6 +2203,27 @@ xmlGetExternalEntityLoader(void) { * @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 doctype + * declaration. It is used for catalog lookups. + * + * The following resource loaders will be called if they were + * registered (in order of precedence): + * + * - the global external entity loader set with + * xmlSetExternalEntityLoader + * - the per-thread xmlParserInputBufferCreateFilenameFunc set with + * xmlParserInputBufferCreateFilenameDefault + * - the default loader which will return + * - the result from a matching global input callback set with + * xmlRegisterInputCallbacks + * - a HTTP resource if support is compiled in. + * - a file opened from the filesystem, with automatic detection + * of compressed files if support is compiled in. + * * Returns the xmlParserInputPtr or NULL */ xmlParserInputPtr