Lines Matching defs:pctxt
421 xmlParserCtxtPtr pctxt;
426 pctxt = xmlNewParserCtxt();
427 if (pctxt == NULL) {
435 pctxt->_private = ctxt->_private;
442 (pctxt->dict != NULL)) {
443 xmlDictFree(pctxt->dict);
444 pctxt->dict = ctxt->doc->dict;
445 xmlDictReference(pctxt->dict);
448 xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
450 inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
452 xmlFreeParserCtxt(pctxt);
456 inputPush(pctxt, inputStream);
458 if (pctxt->directory == NULL)
459 pctxt->directory = xmlParserGetDirectory(URL);
461 pctxt->loadsubset |= XML_DETECT_IDS;
463 xmlParseDocument(pctxt);
465 if (pctxt->wellFormed) {
466 ret = pctxt->myDoc;
470 if (pctxt->myDoc != NULL)
471 xmlFreeDoc(pctxt->myDoc);
472 pctxt->myDoc = NULL;
474 xmlFreeParserCtxt(pctxt);