* xmlCreateDocParserCtxt: * @str: a pointer to an array of xmlChar * * Creates a parser context for an XML in-memory document. * * Returns the new parser context or NULL */
| 13229 | * Returns the new parser context or NULL |
| 13230 | */ |
| 13231 | xmlParserCtxtPtr |
| 13232 | xmlCreateDocParserCtxt(const xmlChar *str) { |
| 13233 | xmlParserCtxtPtr ctxt; |
| 13234 | xmlParserInputPtr input; |
| 13235 | |
| 13236 | ctxt = xmlNewParserCtxt(); |
| 13237 | if (ctxt == NULL) |
| 13238 | return(NULL); |
| 13239 | |
| 13240 | input = xmlNewInputString(ctxt, NULL, (const char *) str, NULL, 0); |
| 13241 | if (input == NULL) { |
| 13242 | xmlFreeParserCtxt(ctxt); |
| 13243 | return(NULL); |
| 13244 | } |
| 13245 | inputPush(ctxt, input); |
| 13246 | |
| 13247 | return(ctxt); |
| 13248 | } |
| 13249 | |
| 13250 | #ifdef LIBXML_SAX1_ENABLED |
| 13251 | /** |
no test coverage detected