这篇教程C++ xmlSetGenericErrorFunc函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xmlSetGenericErrorFunc函数的典型用法代码示例。如果您正苦于以下问题:C++ xmlSetGenericErrorFunc函数的具体用法?C++ xmlSetGenericErrorFunc怎么用?C++ xmlSetGenericErrorFunc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xmlSetGenericErrorFunc函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: s//---------------------------------------------------------------------------int Policy::import_schema_from_memory(const char* buffer, int len, const std::string& save_name){ if (!buffer || !len) { error = "The schema does not exist"; return -1; } Schema s(no_https); xmlSetGenericErrorFunc(&s, &s.manage_generic_error); xmlDocPtr doc = xmlParseMemory(buffer, len); if (!doc) { // maybe put the errors from s.errors error = "The schema given cannot be parsed"; xmlSetGenericErrorFunc(NULL, NULL); return -1; } int ret = import_schema_from_doc(doc, save_name); xmlFreeDoc(doc); xmlSetGenericErrorFunc(NULL, NULL); return ret;}
开发者ID:tribouille,项目名称:MediaConch_SourceCode,代码行数:26,
示例2: initContextxmlDoc *XMLDocument::readDocument(const std::string & xmlCode, const char * encoding, bool validate, std::string * error){ xmlParserCtxt *ctxt = initContext(error, validate); xmlDoc *doc = 0; int options = XML_PARSE_NSCLEAN | XML_PARSE_NOBLANKS; if (validate) { options |= XML_PARSE_DTDVALID; } if (!ctxt) { xmlSetGenericErrorFunc(0, errorFunctionWithoutOutput); return 0; } doc = xmlCtxtReadDoc(ctxt, (const xmlChar *)xmlCode.c_str(), 0, encoding, options); if (!doc || !ctxt->valid) { *error = errorBuffer; } xmlSetGenericErrorFunc(0, errorFunctionWithoutOutput); xmlFreeParserCtxt(ctxt); return doc;}
开发者ID:ScilabOrg,项目名称:scilab,代码行数:28,
示例3: get_filter_from_xmlint get_filter_from_xml(const char *xml, struct acl_filter **filter){ xmlDoc *xmldoc = NULL; int ret = 0; if (xml == NULL || filter == NULL) return 0; xmlSetGenericErrorFunc(NULL, swallow_err_msg); xmldoc = xmlParseMemory(xml, strlen(xml) + 1); if (xmldoc == NULL) goto err; *filter = calloc(1, sizeof(**filter)); if (*filter == NULL) goto err; ret = parse_acl_filter(xmldoc->children, *filter); if (ret == 0) { free(*filter); *filter = NULL; } err: xmlSetGenericErrorFunc(NULL, NULL); xmlFreeDoc(xmldoc); return ret;}
开发者ID:libvirt,项目名称:libvirt-cim,代码行数:30,
示例4: xmlSetGenericErrorFuncvoid Skeleton::LoadSkeletonDataFromXml(const char* xmlData, size_t xmlLength, std::string& xmlErrors){ xmlDoc* doc = NULL; try { xmlSetGenericErrorFunc(&xmlErrors, &errorHandler); doc = xmlParseMemory(xmlData, (int)xmlLength); if (doc) { xmlNode* root = xmlDocGetRootElement(doc); LoadSkeletonData(root); xmlFreeDoc(doc); doc = NULL; } xmlSetGenericErrorFunc(NULL, NULL); } catch (const ColladaException&) { if (doc) xmlFreeDoc(doc); xmlSetGenericErrorFunc(NULL, NULL); throw; } if (! xmlErrors.empty()) throw ColladaException("XML parsing failed");}
开发者ID:2asoft,项目名称:0ad,代码行数:27,
示例5: startElementNsParseXML::ParseXML(void* session, startElementNsSAX2Func start) : startElementNs(start) , endElementNs(NULL) , characters(NULL){ XmlError MyError; MyError.Len = 0; xmlSetGenericErrorFunc(&MyError, ErrorCallback); xmlSAXHandler sax; memset(&sax, 0, sizeof(sax)); sax.initialized = XML_SAX2_MAGIC; sax.startElementNs = _start; sax.endElementNs = _end; sax.characters = _char; mXmlContext = xmlCreatePushParserCtxt(&sax, this, NULL, 0, NULL); if(mXmlContext == NULL) { xmlSetGenericErrorFunc(NULL, NULL); throw std::runtime_error(MyError.Len != 0 ? MyError.Value : "XML Error"); } curl_easy_setopt(session, CURLOPT_WRITEFUNCTION, ParseHandler); curl_easy_setopt(session, CURLOPT_WRITEDATA, this);}
开发者ID:adamvleggett,项目名称:php_glide,代码行数:26,
示例6: g_regex_new/* str_unref() returned string */static char *scrape_uri_from_lyricwiki_search_result(const char *buf, int64_t len){ xmlDocPtr doc; gchar *uri = NULL; /* * workaround buggy lyricwiki search output where it cuts the lyrics * halfway through the UTF-8 symbol resulting in invalid XML. */ GRegex *reg; reg = g_regex_new("<(lyrics?)>.*<///1>", (G_REGEX_MULTILINE | G_REGEX_DOTALL | G_REGEX_UNGREEDY), 0, NULL); gchar *newbuf = g_regex_replace_literal(reg, buf, len, 0, "", G_REGEX_MATCH_NEWLINE_ANY, NULL); g_regex_unref(reg); /* * temporarily set our error-handling functor to our suppression function, * but we have to set it back because other components of Audacious depend * on libxml and we don't want to step on their code paths. * * unfortunately, libxml is anti-social and provides us with no way to get * the previous error functor, so we just have to set it back to default after * parsing and hope for the best. */ xmlSetGenericErrorFunc(NULL, libxml_error_handler); doc = xmlParseMemory(newbuf, strlen(newbuf)); xmlSetGenericErrorFunc(NULL, NULL); if (doc != NULL) { xmlNodePtr root, cur; root = xmlDocGetRootElement(doc); for (cur = root->xmlChildrenNode; cur; cur = cur->next) { if (xmlStrEqual(cur->name, (xmlChar *) "url")) { xmlChar *lyric; gchar *basename; lyric = xmlNodeGetContent(cur); basename = g_path_get_basename((gchar *) lyric); uri = str_printf("http://lyrics.wikia.com/index.php?action=edit" "&title=%s", basename); g_free(basename); xmlFree(lyric); } } xmlFreeDoc(doc); } g_free(newbuf); return uri;}
开发者ID:CBke,项目名称:audacious-plugins,代码行数:60,
示例7: docLoaderFuncstatic xmlDocPtr docLoaderFunc(const xmlChar* uri, xmlDictPtr, int options, void* ctxt, xsltLoadType type){ if (!globalProcessor) return 0; switch (type) { case XSLT_LOAD_DOCUMENT: { xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt; xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); URL url(URL(ParsedURLString, reinterpret_cast<const char*>(base)), reinterpret_cast<const char*>(uri)); xmlFree(base); ResourceError error; ResourceResponse response; Vector<char> data; bool requestAllowed = globalCachedResourceLoader->frame() && globalCachedResourceLoader->document()->securityOrigin()->canRequest(url); if (requestAllowed) { globalCachedResourceLoader->frame()->loader().loadResourceSynchronously(url, AllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, error, response, data); if (error.isNull()) requestAllowed = globalCachedResourceLoader->document()->securityOrigin()->canRequest(response.url()); else data.clear(); } if (!requestAllowed) { data.clear(); globalCachedResourceLoader->printAccessDeniedMessage(url); } PageConsole* console = 0; Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame(); if (frame && frame->page()) console = &frame->page()->console(); xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); // We don't specify an encoding here. Neither Gecko nor WinIE respects // the encoding specified in the HTTP headers. xmlDocPtr doc = xmlReadMemory(data.data(), data.size(), (const char*)uri, 0, options); xmlSetStructuredErrorFunc(0, 0); xmlSetGenericErrorFunc(0, 0); return doc; } case XSLT_LOAD_STYLESHEET: return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((xsltStylesheetPtr)ctxt)->doc, uri); default: break; } return 0;}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:57,
示例8: transform/* * call-seq: * transform(document, params = []) * * Apply an XSLT stylesheet to an XML::Document. * +params+ is an array of strings used as XSLT parameters. * returns Nokogiri::XML::Document * * Example: * * doc = Nokogiri::XML(File.read(ARGV[0])) * xslt = Nokogiri::XSLT(File.read(ARGV[1])) * puts xslt.transform(doc, ['key', 'value']) * */static VALUE transform(int argc, VALUE* argv, VALUE self){ VALUE xmldoc, paramobj, errstr, exception ; xmlDocPtr xml ; xmlDocPtr result ; nokogiriXsltStylesheetTuple *wrapper; const char** params ; long param_len, j ; int parse_error_occurred ; rb_scan_args(argc, argv, "11", &xmldoc, ¶mobj); if (NIL_P(paramobj)) { paramobj = rb_ary_new2(0L) ; } if (!rb_obj_is_kind_of(xmldoc, cNokogiriXmlDocument)) rb_raise(rb_eArgError, "argument must be a Nokogiri::XML::Document"); /* handle hashes as arguments. */ if(T_HASH == TYPE(paramobj)) { paramobj = rb_funcall(paramobj, rb_intern("to_a"), 0); paramobj = rb_funcall(paramobj, rb_intern("flatten"), 0); } Check_Type(paramobj, T_ARRAY); Data_Get_Struct(xmldoc, xmlDoc, xml); Data_Get_Struct(self, nokogiriXsltStylesheetTuple, wrapper); param_len = RARRAY_LEN(paramobj); params = calloc((size_t)param_len+1, sizeof(char*)); for (j = 0 ; j < param_len ; j++) { VALUE entry = rb_ary_entry(paramobj, j); const char * ptr = StringValuePtr(entry); params[j] = ptr; } params[param_len] = 0 ; errstr = rb_str_new(0, 0); xsltSetGenericErrorFunc((void *)errstr, xslt_generic_error_handler); xmlSetGenericErrorFunc(NULL, (xmlGenericErrorFunc)&swallow_superfluous_xml_errors); result = xsltApplyStylesheet(wrapper->ss, xml, params); free(params); xsltSetGenericErrorFunc(NULL, NULL); xmlSetGenericErrorFunc(NULL, NULL); parse_error_occurred = (Qfalse == rb_funcall(errstr, rb_intern("empty?"), 0)); if (parse_error_occurred) { exception = rb_exc_new3(rb_eRuntimeError, errstr); rb_exc_raise(exception); } return Nokogiri_wrap_xml_document((VALUE)0, result) ;}
开发者ID:00zl00,项目名称:AlfredWorkflow.com,代码行数:69,
示例9: setLoaderForLibXMLCallbacksbool XSLStyleSheet::parseString(const String& string, bool){ // Parse in a single chunk into an xmlDocPtr const UChar BOM = 0xFEFF; const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM); setLoaderForLibXMLCallbacks(docLoader()); if (!m_stylesheetDocTaken) xmlFreeDoc(m_stylesheetDoc); m_stylesheetDocTaken = false;#if ENABLE(INSPECTOR) Console* console = 0; if (Frame* frame = ownerDocument()->frame()) console = frame->domWindow()->console(); xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc);#endif const char* buffer = reinterpret_cast<const char*>(string.characters()); int size = string.length() * sizeof(UChar); xmlParserCtxtPtr ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (m_parentStyleSheet) { // The XSL transform may leave the newly-transformed document // with references to the symbol dictionaries of the style sheet // and any of its children. XML document disposal can corrupt memory // if a document uses more than one symbol dictionary, so we // ensure that all child stylesheets use the same dictionaries as their // parents. xmlDictFree(ctxt->dict); ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict; xmlDictReference(ctxt->dict); } m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size, href().utf8().data(), BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); xmlFreeParserCtxt(ctxt); loadChildSheets(); xmlSetStructuredErrorFunc(0, 0); xmlSetGenericErrorFunc(0, 0); setLoaderForLibXMLCallbacks(0); return m_stylesheetDoc;}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:49,
示例10: docLoaderFuncstatic xmlDocPtr docLoaderFunc(const xmlChar* uri, xmlDictPtr, int options, void* ctxt, xsltLoadType type){ if (!globalProcessor) return 0; switch (type) { case XSLT_LOAD_DOCUMENT: { xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt; xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); KURL url(KURL(ParsedURLString, reinterpret_cast<const char*>(base)), reinterpret_cast<const char*>(uri)); xmlFree(base); ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptions()); FetchRequest request(ResourceRequest(url), FetchInitiatorTypeNames::xml, fetchOptions); request.setOriginRestriction(FetchRequest::RestrictToSameOrigin); ResourcePtr<Resource> resource = globalResourceFetcher->fetchSynchronously(request); if (!resource || !globalProcessor) return 0; PageConsole* console = 0; Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame(); if (frame && frame->page()) console = &frame->page()->console(); xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); // We don't specify an encoding here. Neither Gecko nor WinIE respects // the encoding specified in the HTTP headers. SharedBuffer* data = resource->resourceBuffer(); xmlDocPtr doc = data ? xmlReadMemory(data->data(), data->size(), (const char*)uri, 0, options) : 0; xmlSetStructuredErrorFunc(0, 0); xmlSetGenericErrorFunc(0, 0); return doc; } case XSLT_LOAD_STYLESHEET: return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((xsltStylesheetPtr)ctxt)->doc, uri); default: break; } return 0;}
开发者ID:Igalia,项目名称:blink,代码行数:48,
示例11: initint init(void){ daemonize = TRUE; every = EVERY_5SECS; xmlSetGenericErrorFunc(NULL, UpwatchXmlGenericErrorFunc); return(1);}
开发者ID:BackupTheBerlios,项目名称:upwatch-svn,代码行数:7,
示例12: lpc2xml_convert_stringint lpc2xml_convert_string(lpc2xml_context* context, char **content) { int ret = -1; xmlBufferPtr buffer = xmlBufferCreate(); xmlSaveCtxtPtr save_ctx; lpc2xml_context_clear_logs(context); xmlSetGenericErrorFunc(context, lpc2xml_genericxml_error); save_ctx = xmlSaveToBuffer(buffer, "UTF-8", XML_SAVE_FORMAT); if(save_ctx != NULL) { ret = internal_convert_lpc2xml(context); if(ret == 0) { ret = xmlSaveDoc(save_ctx, context->doc); if(ret != 0) { lpc2xml_log(context, LPC2XML_ERROR, "Can't save document"); lpc2xml_log(context, LPC2XML_ERROR, "%s", context->errorBuffer); } } xmlSaveClose(save_ctx); } else { lpc2xml_log(context, LPC2XML_ERROR, "Can't initialize internal buffer"); lpc2xml_log(context, LPC2XML_ERROR, "%s", context->errorBuffer); } if(ret == 0) {#if LIBXML_VERSION >= 20800 *content = (char *)xmlBufferDetach(buffer);#else *content = strdup((const char *)xmlBufferContent(buffer));#endif } xmlBufferFree(buffer); return ret;}
开发者ID:Accontech,项目名称:ace-ios,代码行数:31,
示例13: initXMLXMLParser::XMLParser(Common::ReadStream &stream, bool makeLower, const Common::UString &fileName) { initXML(); Common::UString parseError; xmlSetGenericErrorFunc(static_cast<void *>(&parseError), errorFuncUString); const int options = XML_PARSE_NOWARNING | XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_NSCLEAN | XML_PARSE_NOCDATA; xmlDocPtr xml = xmlReadIO(readStream, closeStream, static_cast<void *>(&stream), fileName.c_str(), 0, options); if (!xml) { Common::Exception e; if (!parseError.empty()) e.add("%s", parseError.c_str()); e.add("XML document failed to parse"); throw e; } BOOST_SCOPE_EXIT( (&xml) ) { xmlFreeDoc(xml); } BOOST_SCOPE_EXIT_END xmlNodePtr root = xmlDocGetRootElement(xml); if (!root) throw Common::Exception("XML document has no root node"); _rootNode.reset(new XMLNode(*root, makeLower)); deinitXML();}
开发者ID:farmboy0,项目名称:xoreos-tools,代码行数:33,
示例14: irislwz_Validateint irislwz_Validate(IRISLWZ_HANDLE *handle, const char *xml, char **beautified)/*!/brief Do an XML validation against a text * * This function takes the given /p xml test an tries to validate it with the XML * library (xmlReadMemory). If the XML is valid, a /p beautified version, which can * be better read by humans, can be stored optionally. * * /param[in] handle pointer to an IRISLWZ_HANDLE object * /param[in] xml pointer to the text which should be validated * /param[out] beautified optional pointer to which a beautified version of the xml * is written. The Memory for this is allocated by the library, but must be freed by the * client using /p free. * * /returns If the XML is valid, the function returns 1, otherwise 0. * * /example/codeconst char *xml="<iris1:request xmlns:iris1=/"urn:ietf:params:xml:ns:iris1/">" "<iris1:searchSet><iris1:lookupEntity registryType=/"dchk1/" " "entityClass=/"domain-name/" entityName=/"denic.de/"/>" "</iris1:searchSet></iris1:request>";char *beautified=NULL;if (irislwz_Validate(handle,xml,&beautified)) { printf ("Original XML code:/n"); printf ("%s/n",xml); printf ("Beautified version:/n"); printf ("%s/n",beautified);}if (beautified) free(beautified);/endcode * * /ingroup DCHK_API_IRISLWZ */{ xmlSetGenericErrorFunc(handle,irislwz_xmlGenericErrorFunc); xmlDoc *doc = NULL; //xmlNode *root_element = NULL; int size=(int)strlen(xml); //printf ("Query: >>%s<</n",xml); //printf ("Size: %i Bytes/n",size); doc = xmlReadMemory (xml, size, NULL, "UTF-8", XML_PARSE_NONET); if (doc == NULL) { irislwz_SetError(handle,74044,NULL); return 0; } if (beautified) { xmlChar *mem; int size; xmlKeepBlanksDefault(0); xmlDocDumpFormatMemoryEnc(doc, &mem, &size, handle->localcharset,1); *beautified=strdup((char*)mem); xmlFree(mem); } xmlFreeDoc(doc); return 1;}
开发者ID:pfedick,项目名称:dchk-client,代码行数:60,
示例15: init_libxml2// [[Rcpp::export]]void init_libxml2() { // Check that header and libs are compatible LIBXML_TEST_VERSION xmlInitParser(); xmlSetStructuredErrorFunc(NULL, handleStructuredError); xmlSetGenericErrorFunc(NULL, handleGenericError);}
开发者ID:jeroenooms,项目名称:xml2,代码行数:9,
示例16: DBGint MOD_CLS_NAME::preload() { DBG("initializing libxml2.../n"); xmlInitParser(); initGenericErrorDefaultFunc(&handler); handler = (xmlGenericErrorFunc)xml_err_func; xmlSetGenericErrorFunc(NULL, &xml_err_func); return 0;}
开发者ID:arovetto,项目名称:sems,代码行数:8,
示例17: raptor_www_libxml_initvoidraptor_www_libxml_init(raptor_www *www){ www->error_handlers.handlers[RAPTOR_LOG_LEVEL_NONE].user_data=www; www->old_xmlGenericErrorContext=xmlGenericErrorContext; xmlSetGenericErrorFunc(&www->error_handlers, raptor_libxml_generic_error); www->ctxt=NULL;}
开发者ID:nabel,项目名称:copasi-simple-api,代码行数:8,
示例18: initErrorHandlervoid initErrorHandler (){ xmlSecErrorsSetCallback(secErrorCallback); xmlSetGenericErrorFunc(xml_error_str, xmlErrorCallback);#ifndef XMLSEC_NO_XSLT xsltSetGenericErrorFunc(xslt_error_str, xmlErrorCallback);#endif}
开发者ID:gsaly,项目名称:xades_library,代码行数:8,
示例19: hwloc_libxml2_disable_stderrwarningsstatic voidhwloc_libxml2_disable_stderrwarnings(void){ static int first = 1; if (first) { xmlSetGenericErrorFunc(NULL, hwloc__xml_verbose() ? xmlGenericError : hwloc_libxml2_error_callback); first = 0; }}
开发者ID:bringhurst,项目名称:ompi,代码行数:9,
示例20: initXML// Initialize libxml2 and check for potential ABI mismatches between// compiled version and the shared library actually used.void initXML(){ console.log(CON_LOG, CON_ALWAYS, "Initializing libxml2..."); xmlInitParser(); LIBXML_TEST_VERSION; // Suppress libxml2 error messages xmlSetGenericErrorFunc(NULL, xmlNullLogger);}
开发者ID:moonlight,项目名称:blues-brothers-rpg,代码行数:11,
示例21: raptor_www_libxml_initvoidraptor_www_libxml_init(raptor_www *www){ initGenericErrorDefaultFunc(&www->old_handler); /* This will destroy the generic error default context: * there is no way to query and save it (xmlGenericErrorContext) */ xmlSetGenericErrorFunc(www, raptor_www_libxml_http_error); www->ctxt=NULL;}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:10,
示例22: event_config_readvoid event_config_read (void){ int ret; ice_config_t *config; ice_config_t new_config, old_config; /* reread config file */ INFO0("Re-reading XML"); config = config_grab_config(); /* Both to get the lock, and to be able to find out the config filename */ xmlSetGenericErrorFunc (config->config_filename, log_parse_failure); xmlSetStructuredErrorFunc ("conf/file", config_xml_parse_failure); ret = config_parse_file(config->config_filename, &new_config); if(ret < 0) { ERROR0("Error parsing config, not replacing existing config"); switch(ret) { case CONFIG_EINSANE: ERROR0("Config filename null or blank"); break; case CONFIG_ENOROOT: ERROR1("Root element not found in %s", config->config_filename); break; case CONFIG_EBADROOT: ERROR1("Not an icecast2 config file: %s", config->config_filename); break; default: ERROR1("Parse error in reading %s", config->config_filename); break; } config_release_config(); } else { restart_logging (&new_config); config_set_config (&new_config, &old_config); config_release_config(); connection_thread_shutdown(); redirector_clearall(); fserve_scan ((time_t)0); config = config_get_config(); yp_recheck_config (config); fserve_recheck_mime_types (config); stats_global (config); workers_adjust (config->workers_count); connection_listen_sockets_close (config, 0); redirector_setup (config); update_relays (config); config_release_config(); slave_restart(); config_clear (&old_config); }}
开发者ID:8Media,项目名称:icecast-kh,代码行数:54,
示例23: initint init(void){ if (!HAVE_OPT(OUTPUT)) { LOG(LOG_ERR, "missing output option"); return 0; } daemonize = TRUE; every = EVERY_MINUTE; xmlSetGenericErrorFunc(NULL, UpwatchXmlGenericErrorFunc); return(1);}
开发者ID:BackupTheBerlios,项目名称:upwatch-svn,代码行数:11,
示例24: m_SchemaParserCtxtXMLParser::XMLParser() : m_SchemaParserCtxt(0), m_Schema(0), m_SchemaValidCtxt(0), m_DTD(0), m_DTDValidCtxt(0), m_Doc(0){ xmlPedanticParserDefault(1); xmlSetGenericErrorFunc(this, errorOutputFunc); xmlDoValidityCheckingDefaultValue = 0;}
开发者ID:JohnChu,项目名称:libavg,代码行数:12,
示例25: m_oldDocumentXMLDocumentParserScope::XMLDocumentParserScope(Document* document, xmlGenericErrorFunc genericErrorFunc, xmlStructuredErrorFunc structuredErrorFunc, void* errorContext) : m_oldDocument(currentDocument) , m_oldGenericErrorFunc(xmlGenericError) , m_oldStructuredErrorFunc(xmlStructuredError) , m_oldErrorContext(xmlGenericErrorContext){ currentDocument = document; if (genericErrorFunc) xmlSetGenericErrorFunc(errorContext, genericErrorFunc); if (structuredErrorFunc) xmlSetStructuredErrorFunc(errorContext, structuredErrorFunc);}
开发者ID:dstockwell,项目名称:blink,代码行数:12,
示例26: s//---------------------------------------------------------------------------int XsltPolicy::create_policy_from_mi(const std::string& report){ Xslt s(no_https); xmlSetGenericErrorFunc(&s, &s.manage_generic_error); xmlDocPtr doc = xmlParseMemory(report.c_str(), report.length()); xmlSetGenericErrorFunc(NULL, NULL); if (!doc) { // maybe put the errors from s.errors error = "The MediaInfo report given cannot be parsed"; return -1; } xmlNodePtr root = xmlDocGetRootElement(doc); if (!root) { error = "No root node, leaving"; xmlFreeDoc(doc); return 0; } for (xmlNodePtr child = root->children; child; child = child->next) { std::string def("media"); if (child->type == XML_TEXT_NODE || !child->name || def.compare((const char*)child->name)) continue; if (find_media_track_node(child) < 0) { xmlFreeDoc(doc); return -1; } break; } xmlFreeDoc(doc); return 0;}
开发者ID:tribouille,项目名称:MediaConch_SourceCode,代码行数:41,
示例27: wi_error_enter_threadvoid wi_error_enter_thread(void) { wi_error_t *error; error = _wi_error_init(_wi_error_alloc()); wi_mutable_dictionary_set_data_for_key(wi_thread_dictionary(), error, WI_STR(_WI_ERROR_THREAD_KEY)); wi_release(error); wi_error_set_error(WI_ERROR_DOMAIN_NONE, WI_ERROR_NONE); #ifdef WI_LIBXML2 xmlSetGenericErrorFunc(NULL, _wi_error_xml_error_handler);#endif}
开发者ID:balr0g,项目名称:libwired-old,代码行数:13,
示例28: raptor_libxml_finishvoidraptor_libxml_finish(raptor_world* world){ if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_STRUCTURED_ERROR_SAVE) xmlSetStructuredErrorFunc(world->libxml_saved_structured_error_context, world->libxml_saved_structured_error_handler); if(world->libxml_flags & RAPTOR_WORLD_FLAG_LIBXML_GENERIC_ERROR_SAVE) xmlSetGenericErrorFunc(world->libxml_saved_generic_error_context, world->libxml_saved_generic_error_handler); xmlCleanupParser();}
开发者ID:nevali,项目名称:raptor,代码行数:13,
注:本文中的xmlSetGenericErrorFunc函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xmlSetNs函数代码示例 C++ xmlSecTransformGetName函数代码示例 |