mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
parser: Rename internal xmlNewInput functions
This commit is contained in:
45
HTMLparser.c
45
HTMLparser.c
@@ -4996,9 +4996,6 @@ htmlFreeParserCtxt(htmlParserCtxtPtr ctxt)
|
||||
*
|
||||
* See xmlCtxtSetErrorHandler for advanced error handling.
|
||||
*
|
||||
* See xmlNewInputURL, xmlNewInputMemory, xmlNewInputIO and similar
|
||||
* functions for advanced input control.
|
||||
*
|
||||
* See htmlNewSAXParserCtxt for custom SAX parsers.
|
||||
*
|
||||
* Returns the htmlParserCtxtPtr or NULL in case of allocation error
|
||||
@@ -5059,7 +5056,7 @@ htmlCreateMemoryParserCtxtInternal(const char *url,
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
|
||||
input = xmlNewInputMemory(ctxt, url, buffer, size, encoding, 0);
|
||||
input = xmlCtxtNewInputFromMemory(ctxt, url, buffer, size, encoding, 0);
|
||||
if (input == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
@@ -5116,7 +5113,8 @@ htmlCreateDocParserCtxt(const xmlChar *str, const char *url,
|
||||
if (ctxt == NULL)
|
||||
return(NULL);
|
||||
|
||||
input = xmlNewInputString(ctxt, url, (const char *) str, encoding, 0);
|
||||
input = xmlCtxtNewInputFromString(ctxt, url, (const char *) str,
|
||||
encoding, 0);
|
||||
if (input == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
@@ -5960,7 +5958,7 @@ htmlCreateFileParserCtxt(const char *filename, const char *encoding)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0);
|
||||
input = xmlCtxtNewInputFromUrl(ctxt, filename, NULL, encoding, 0);
|
||||
if (input == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
@@ -6026,8 +6024,6 @@ htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr s
|
||||
*
|
||||
* Parse an HTML file and build a tree.
|
||||
*
|
||||
* See xmlNewInputURL for details.
|
||||
*
|
||||
* Returns the resulting document tree
|
||||
*/
|
||||
|
||||
@@ -6426,8 +6422,8 @@ htmlReadDoc(const xmlChar *str, const char *url, const char *encoding,
|
||||
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputString(ctxt, url, (const char *) str, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
input = xmlCtxtNewInputFromString(ctxt, url, (const char *) str, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
|
||||
doc = htmlCtxtParseDocument(ctxt, input);
|
||||
|
||||
@@ -6461,7 +6457,7 @@ htmlReadFile(const char *filename, const char *encoding, int options)
|
||||
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0);
|
||||
input = xmlCtxtNewInputFromUrl(ctxt, filename, NULL, encoding, 0);
|
||||
|
||||
doc = htmlCtxtParseDocument(ctxt, input);
|
||||
|
||||
@@ -6501,8 +6497,8 @@ htmlReadMemory(const char *buffer, int size, const char *url,
|
||||
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputMemory(ctxt, url, buffer, size, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
input = xmlCtxtNewInputFromMemory(ctxt, url, buffer, size, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
|
||||
doc = htmlCtxtParseDocument(ctxt, input);
|
||||
|
||||
@@ -6540,7 +6536,7 @@ htmlReadFd(int fd, const char *url, const char *encoding, int options)
|
||||
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputFd(ctxt, url, fd, encoding, 0);
|
||||
input = xmlCtxtNewInputFromFd(ctxt, url, fd, encoding, 0);
|
||||
|
||||
doc = htmlCtxtParseDocument(ctxt, input);
|
||||
|
||||
@@ -6578,7 +6574,8 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
|
||||
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputIO(ctxt, url, ioread, ioclose, ioctx, encoding, 0);
|
||||
input = xmlCtxtNewInputFromIO(ctxt, url, ioread, ioclose, ioctx,
|
||||
encoding, 0);
|
||||
|
||||
doc = htmlCtxtParseDocument(ctxt, input);
|
||||
|
||||
@@ -6612,7 +6609,8 @@ htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar *str,
|
||||
htmlCtxtReset(ctxt);
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputString(ctxt, URL, (const char *) str, encoding, 0);
|
||||
input = xmlCtxtNewInputFromString(ctxt, URL, (const char *) str,
|
||||
encoding, 0);
|
||||
|
||||
return(htmlCtxtParseDocument(ctxt, input));
|
||||
}
|
||||
@@ -6627,7 +6625,7 @@ htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar *str,
|
||||
* Parse an HTML file from the filesystem, the network or a
|
||||
* user-defined resource loader.
|
||||
*
|
||||
* See xmlNewInputURL and htmlCtxtUseOptions for details.
|
||||
* See htmlCtxtUseOptions for details.
|
||||
*
|
||||
* Returns the resulting document tree
|
||||
*/
|
||||
@@ -6643,7 +6641,7 @@ htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,
|
||||
htmlCtxtReset(ctxt);
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0);
|
||||
input = xmlCtxtNewInputFromUrl(ctxt, filename, NULL, encoding, 0);
|
||||
|
||||
return(htmlCtxtParseDocument(ctxt, input));
|
||||
}
|
||||
@@ -6676,8 +6674,8 @@ htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size,
|
||||
htmlCtxtReset(ctxt);
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputMemory(ctxt, URL, buffer, size, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
input = xmlCtxtNewInputFromMemory(ctxt, URL, buffer, size, encoding,
|
||||
XML_INPUT_BUF_STATIC);
|
||||
|
||||
return(htmlCtxtParseDocument(ctxt, input));
|
||||
}
|
||||
@@ -6711,7 +6709,7 @@ htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd,
|
||||
htmlCtxtReset(ctxt);
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputFd(ctxt, URL, fd, encoding, 0);
|
||||
input = xmlCtxtNewInputFromFd(ctxt, URL, fd, encoding, 0);
|
||||
|
||||
return(htmlCtxtParseDocument(ctxt, input));
|
||||
}
|
||||
@@ -6728,7 +6726,7 @@ htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd,
|
||||
*
|
||||
* Parse an HTML document from I/O functions and source and build a tree.
|
||||
*
|
||||
* See xmlNewInputIO and htmlCtxtUseOptions for details.
|
||||
* See htmlCtxtUseOptions for details.
|
||||
*
|
||||
* Returns the resulting document tree
|
||||
*/
|
||||
@@ -6746,7 +6744,8 @@ htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
|
||||
htmlCtxtReset(ctxt);
|
||||
htmlCtxtUseOptions(ctxt, options);
|
||||
|
||||
input = xmlNewInputIO(ctxt, URL, ioread, ioclose, ioctx, encoding, 0);
|
||||
input = xmlCtxtNewInputFromIO(ctxt, URL, ioread, ioclose, ioctx,
|
||||
encoding, 0);
|
||||
|
||||
return(htmlCtxtParseDocument(ctxt, input));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user