* xmlNewInputURL: * @ctxt: parser context * @url: filename or URL * @publicId: publid ID from doctype (optional) * @encoding: character encoding (optional) * @flags: unused, pass 0 * * Creates a new parser input from the filesystem, the network or * a user-defined resource loader. * * Returns a new parser input. */
| 1561 | * Returns a new parser input. |
| 1562 | */ |
| 1563 | xmlParserInputPtr |
| 1564 | xmlNewInputURL(xmlParserCtxtPtr ctxt, const char *url, const char *publicId, |
| 1565 | const char *encoding, int flags ATTRIBUTE_UNUSED) { |
| 1566 | xmlParserInputPtr input; |
| 1567 | |
| 1568 | if ((ctxt == NULL) || (url == NULL)) |
| 1569 | return(NULL); |
| 1570 | |
| 1571 | input = xmlLoadExternalEntity(url, publicId, ctxt); |
| 1572 | if (input == NULL) |
| 1573 | return(NULL); |
| 1574 | |
| 1575 | if (encoding != NULL) |
| 1576 | xmlSwitchInputEncodingName(ctxt, input, encoding); |
| 1577 | |
| 1578 | return(input); |
| 1579 | } |
| 1580 | |
| 1581 | /** |
| 1582 | * xmlNewInputInternal: |
no test coverage detected