这篇教程C++ xmlSubstituteEntitiesDefault函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xmlSubstituteEntitiesDefault函数的典型用法代码示例。如果您正苦于以下问题:C++ xmlSubstituteEntitiesDefault函数的具体用法?C++ xmlSubstituteEntitiesDefault怎么用?C++ xmlSubstituteEntitiesDefault使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xmlSubstituteEntitiesDefault函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: xslt_initializevoid xslt_initialize(){ xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; memset(cache, 0, sizeof(stylesheet_cache_t)*CACHESIZE); thread_mutex_create(&xsltlock); xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1;}
开发者ID:kitsune-dsu,项目名称:kitsune-icecast,代码行数:10,
示例2: rxml_default_substitute_entities_set/* * call-seq: * XML.default_substitute_entities = true|false * * Controls whether parsers perform inline entity substitution * (for external entities) by default. */static VALUE rxml_default_substitute_entities_set(VALUE klass, VALUE value){ if (value == Qfalse) { xmlSubstituteEntitiesDefault(0); return (Qfalse); } else { xmlSubstituteEntitiesDefault(1); return (Qtrue); }}
开发者ID:xml4r,项目名称:libxml-ruby,代码行数:20,
示例3: mainint main(int argc, char **argv) { int i; int files = 0; if (argc <= 1) { usage(argv[0]); return(1); } LIBXML_TEST_VERSION for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; else if ((!strcmp(argv[i], "-dump")) || (!strcmp(argv[i], "--dump"))) dump++; else if ((!strcmp(argv[i], "-count")) || (!strcmp(argv[i], "--count"))) count++; else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid"))) valid++; else if ((!strcmp(argv[i], "-noent")) || (!strcmp(argv[i], "--noent"))) noent++; } if (noent != 0) xmlSubstituteEntitiesDefault(1); for (i = 1; i < argc ; i++) { if (argv[i][0] != '-') { handleFile(argv[i]); files ++; } } xmlCleanupParser(); xmlMemoryDump(); return(0);}
开发者ID:shines77,项目名称:libs3_example,代码行数:34,
示例4: xmlsec_initint xmlsec_init() { /* init libxml lib */ xmlInitParser(); xmlIndentTreeOutput = 1; LIBXML_TEST_VERSION xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; xmlSubstituteEntitiesDefault(1); /* init xmlsec lib */ if(xmlSecInit() < 0) { dcp_log(OPENDCP_ERROR,"Error: xmlsec initialization failed."); return(OPENDCP_ERROR); } /* Check loaded library version */ if(xmlSecCheckVersion() != 1) { dcp_log(OPENDCP_ERROR, "Error: loaded xmlsec library version is not compatible."); return(OPENDCP_ERROR); } /* Init crypto library */ if(xmlSecCryptoAppInit(NULL) < 0) { dcp_log(OPENDCP_ERROR, "Error: crypto initialization failed."); return(OPENDCP_ERROR); } /* Init xmlsec-crypto library */ if(xmlSecCryptoInit() < 0) { dcp_log(OPENDCP_ERROR, "Error: xmlsec-crypto initialization failed."); return(OPENDCP_ERROR); } return(OPENDCP_NO_ERROR);}
开发者ID:cbsrobot,项目名称:OpenDCP,代码行数:34,
示例5: xmlDocGetRootElementstatic xmlDoc *test_xslt_transforms(xmlDoc *doc, GError **error){ struct xslt_files *info = xslt_files; xmlDoc *transformed; xsltStylesheetPtr xslt = NULL; xmlNode *root_element = xmlDocGetRootElement(doc); char *attribute; while ((info->root) && (strcasecmp(root_element->name, info->root) != 0)) { info++; } if (info->root) { attribute = xmlGetProp(xmlFirstElementChild(root_element), "name"); if (attribute) { if (strcasecmp(attribute, "subsurface") == 0) { free((void *)attribute); return doc; } free((void *)attribute); } xmlSubstituteEntitiesDefault(1); xslt = get_stylesheet(info->file); if (xslt == NULL) { parser_error(error, _("Can't open stylesheet (%s)/%s"), xslt_path, info->file); return doc; } transformed = xsltApplyStylesheet(xslt, doc, NULL); xmlFreeDoc(doc); xsltFreeStylesheet(xslt); return transformed; } return doc;}
开发者ID:syuxue,项目名称:subsurface,代码行数:35,
示例6: mainint main(int argc, char **argv) { xsltStylesheetPtr stylesheet = NULL; xmlDocPtr doc, res; char* stylesheetfile; char* infile; char *outfile; if (argc!=4) { printf("XSLT Transform/n2009 by thom using libxml2/nUsage:/n/txslt-transform <stylesheet> <infile> <outfile>/n"); exit(1); } stylesheetfile = argv[1]; infile = argv[2]; outfile = argv[3]; xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; stylesheet = xsltParseStylesheetFile(BAD_CAST stylesheetfile); doc = xmlParseFile(infile); res = xsltApplyStylesheet(stylesheet, doc, 0); printf("use /"%s/" to transform /"%s/" to /"%s/" .../n", stylesheetfile, infile, outfile); xsltSaveResultToFilename(outfile, res, stylesheet, 0); xsltFreeStylesheet(stylesheet); xmlFreeDoc(res); xmlFreeDoc(doc); xsltCleanupGlobals(); xmlCleanupParser(); printf("/tDone./n"); exit(0);}
开发者ID:stzschoppe,项目名称:sw-ergonomie,代码行数:32,
示例7: yum_xml_parse_filelistsvoidyum_xml_parse_filelists (const char *filename, CountFn count_callback, PackageFn package_callback, gpointer user_data, GError **err){ FilelistSAXContext ctx; SAXContext *sctx = &ctx.sctx; int rc; ctx.state = FILELIST_PARSER_TOPLEVEL; ctx.current_file = NULL; sax_context_init(sctx, "filelists.xml", count_callback, package_callback, user_data, err); xmlSubstituteEntitiesDefault (1); rc = xmlSAXUserParseFile (&filelist_sax_handler, &ctx, filename); if (sctx->current_package) { g_warning ("Incomplete package lost"); package_free (sctx->current_package); } if (ctx.current_file) g_free (ctx.current_file); g_string_free (sctx->text_buffer, TRUE);}
开发者ID:rpm-software-management,项目名称:yum-metadata-parser,代码行数:31,
示例8: xmlsec_verify_initint xmlsec_verify_init() { /* init libxml lib */ xmlInitParser(); xmlIndentTreeOutput = 1; LIBXML_TEST_VERSION xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; xmlSubstituteEntitiesDefault(1); /* init xmlsec lib */ if(xmlSecInit() < 0) { dcp_log(DCP_FATAL,"xmlsec initialization failed"); return(DCP_FATAL); } /* Check loaded library version */ if(xmlSecCheckVersion() != 1) { dcp_log(DCP_FATAL, "loaded xmlsec library version is not compatible"); return(DCP_FATAL); } /* Init crypto library */ if(xmlSecCryptoAppInit(NULL) < 0) { dcp_log(DCP_FATAL, "crypto initialization failed"); return(DCP_FATAL); } /* Init xmlsec-crypto library */ if(xmlSecCryptoInit() < 0) { dcp_log(DCP_FATAL, "xmlsec-crypto initialization failed"); return(DCP_FATAL); } return(DCP_SUCCESS);}
开发者ID:cbsrobot,项目名称:OpenDCP,代码行数:34,
示例9: raptor_rss_parse_initstatic intraptor_rss_parse_init(raptor_parser* rdf_parser, const char *name) { raptor_rss_parser_context *rss_parser=(raptor_rss_parser_context*)rdf_parser->context; int i; RAPTOR_RDF_type_URI(rss_parser)=raptor_new_uri_for_rdf_concept("type"); RAPTOR_RDF_Seq_URI(rss_parser)=raptor_new_uri_for_rdf_concept("Seq"); for(i=0; i<RSS_NAMESPACES_SIZE;i++) { const char *uri_string=rss_namespace_uri_strings[i]; if(uri_string) rss_parser->namespace_uris[i]=raptor_new_uri((const unsigned char*)uri_string); } for(i=0; i< RAPTOR_RSS_COMMON_SIZE; i++) { raptor_uri *namespace_uri=rss_parser->namespace_uris[raptor_rss_types_info[i].nspace]; if(namespace_uri) raptor_rss_types_info[i].uri=raptor_new_uri_from_uri_local_name(namespace_uri, (const unsigned char*)raptor_rss_types_info[i].name); } for(i=0; i< RAPTOR_RSS_FIELDS_SIZE; i++) { raptor_uri *namespace_uri=rss_parser->namespace_uris[raptor_rss_fields_info[i].nspace]; if(namespace_uri) raptor_rss_fields_info[i].uri=raptor_new_uri_from_uri_local_name(namespace_uri, (const unsigned char*)raptor_rss_fields_info[i].name); } xmlSubstituteEntitiesDefault(1); return 0;}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:32,
示例10: xsltFileNamevoid Docbook2XhtmlGeneratorJob::run(){ UMLDoc* umlDoc = UMLApp::app()->document(); xsltStylesheetPtr cur = NULL; xmlDocPtr doc, res; const char *params[16 + 1]; int nbparams = 0; params[nbparams] = NULL; umlDoc->writeToStatusBar(i18n("Exporting to XHTML...")); QString xsltFileName(KGlobal::dirs()->findResource("appdata", QLatin1String("docbook2xhtml.xsl"))); uDebug() << "XSLT file is'" << xsltFileName << "'"; QFile xsltFile(xsltFileName); xsltFile.open(QIODevice::ReadOnly); QString xslt = QString::fromLatin1(xsltFile.readAll()); uDebug() << "XSLT is'" << xslt << "'"; xsltFile.close(); QString localXsl = KGlobal::dirs()->findResource("data", QLatin1String("ksgmltools2/docbook/xsl/html/docbook.xsl")); uDebug() << "Local xsl is'" << localXsl << "'"; if (!localXsl.isEmpty()) { localXsl = QLatin1String("href=/"file://") + localXsl + QLatin1String("/""); xslt.replace(QRegExp(QLatin1String("href=/"http://[^/"]*/"")), localXsl); } KTemporaryFile tmpXsl; tmpXsl.setAutoRemove(false); tmpXsl.open(); QTextStream str (&tmpXsl); str << xslt; str.flush(); xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; uDebug() << "Parsing stylesheet " << tmpXsl.fileName(); cur = xsltParseStylesheetFile((const xmlChar *)tmpXsl.fileName().toLatin1().constData()); uDebug() << "Parsing file " << m_docbookUrl.path(); doc = xmlParseFile((const char*)(m_docbookUrl.path().toUtf8())); uDebug() << "Applying stylesheet "; res = xsltApplyStylesheet(cur, doc, params); KTemporaryFile tmpXhtml; tmpXhtml.setAutoRemove(false); tmpXhtml.open(); uDebug() << "Writing HTML result to temp file: " << tmpXhtml.fileName(); xsltSaveResultToFd(tmpXhtml.handle(), res, cur); xsltFreeStylesheet(cur); xmlFreeDoc(res); xmlFreeDoc(doc); xsltCleanupGlobals(); xmlCleanupParser(); emit xhtmlGenerated(tmpXhtml.fileName());}
开发者ID:behlingc,项目名称:umbrello-behlingc,代码行数:59,
示例11: initializevoid initialize(void){ xmlInitParser(); xmlSubstituteEntitiesDefault(1); doc = xmlNewDoc(BAD_CAST "1.0"); root_node = xmlNewNode(NULL, BAD_CAST "_R_"); xmlDocSetRootElement(doc, root_node);}
开发者ID:savonix,项目名称:dbrs2xml,代码行数:8,
示例12: m_xmlInputXSLTUtils::XSLTUtils() :m_xmlInput(nullptr), m_xmlOutput(nullptr), m_xmlStylesheet(nullptr), m_xsltStylesheet(nullptr){ // initialize libxslt xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 0; xsltSetGenericErrorFunc(NULL, err);}
开发者ID:Elzevir,项目名称:xbmc,代码行数:8,
|