* xmlCtxtReadDoc: * @ctxt: an XML parser context * @str: a pointer to a zero terminated string * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML in-memory document and build a tree. * * @URL is used as base to resolve external entities and for error * reporting. * * See xmlCtxtUseOptions for deta
| 14033 | * Returns the resulting document tree |
| 14034 | */ |
| 14035 | xmlDocPtr |
| 14036 | xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar *str, |
| 14037 | const char *URL, const char *encoding, int options) |
| 14038 | { |
| 14039 | xmlParserInputPtr input; |
| 14040 | |
| 14041 | if (ctxt == NULL) |
| 14042 | return(NULL); |
| 14043 | |
| 14044 | xmlCtxtReset(ctxt); |
| 14045 | xmlCtxtUseOptions(ctxt, options); |
| 14046 | |
| 14047 | input = xmlNewInputString(ctxt, URL, (const char *) str, encoding, |
| 14048 | XML_INPUT_BUF_STATIC); |
| 14049 | |
| 14050 | return(xmlCtxtParseDocument(ctxt, input)); |
| 14051 | } |
| 14052 | |
| 14053 | /** |
| 14054 | * xmlCtxtReadFile: |
nothing calls this directly
no test coverage detected