您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ xmlHashLookup函数代码示例

51自学网 2021-06-03 11:46:00
  C++
这篇教程C++ xmlHashLookup函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中xmlHashLookup函数的典型用法代码示例。如果您正苦于以下问题:C++ xmlHashLookup函数的具体用法?C++ xmlHashLookup怎么用?C++ xmlHashLookup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了xmlHashLookup函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: boxpath_from_string

boxpath *       boxpath_from_string(const char * path){	char * dir = dirname(strdup(path));	char * file = basename(strdup(path));	boxpath * bpath = (boxpath*) malloc(sizeof(boxpath));  	bpath->dir = xmlHashLookup(allDirs, dir);	bpath->base = strdup(file);	bpath->file = (strcmp(path,"/") ? NULL : rootDir);	bpath->is_dir = (xmlHashLookup(allDirs, path)!=NULL);	free(dir);	return bpath; }
开发者ID:joeythesaint,项目名称:boxfs2,代码行数:14,


示例2: xsltCopyNamespace

/** * xsltCopyNamespace: * @ctxt:  a transformation context * @node:  the target node * @cur:  the namespace node * * Do a copy of an namespace node. If @node is non-NULL the * new namespaces are added automatically. This handles namespaces * aliases * * Returns: a new xmlNsPtr, or NULL in case of error. */xmlNsPtrxsltCopyNamespace(xsltTransformContextPtr ctxt, xmlNodePtr node,	          xmlNsPtr cur) {    xmlNsPtr ret = NULL;    const xmlChar *URI;    if (cur == NULL)	return(NULL);    if (cur->type != XML_NAMESPACE_DECL)	return(NULL);    /*     * One can add namespaces only on element nodes     */    if ((node != NULL) && (node->type != XML_ELEMENT_NODE))	node = NULL;    if (!xmlStrEqual(cur->href, XSLT_NAMESPACE)) {	URI = (const xmlChar *) xmlHashLookup(ctxt->style->nsAliases,					      cur->href);	if (URI != NULL) {	    ret = xmlNewNs(node, URI, cur->prefix);	} else {	    ret = xmlNewNs(node, cur->href, cur->prefix);	}    }    return(ret);}
开发者ID:gitpan,项目名称:AxKit-Needs,代码行数:40,


示例3: schema_cache_get

static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection2* iface, BSTR uri,                                       IXMLDOMNode** node){    schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);    cache_entry* entry;    xmlChar* name;    TRACE("(%p)->(%s %p)/n", This, debugstr_w(uri), node);    if (This->version == MSXML6)    {        if (node) *node = NULL;        return E_NOTIMPL;    }    if (!node)        return E_POINTER;    *node = NULL;    name = uri ? xmlchar_from_wchar(uri) : xmlchar_from_wchar(emptyW);    entry = (cache_entry*) xmlHashLookup(This->cache, name);    heap_free(name);    /* TODO: this should be read-only */    if (entry && entry->doc)        return get_domdoc_from_xmldoc(entry->doc, (IXMLDOMDocument3**)node);    return S_OK;}
开发者ID:ZoloZiak,项目名称:reactos,代码行数:30,


示例4: lookup_schema_elemDecl

static xmlSchemaElementPtr lookup_schema_elemDecl(xmlSchemaPtr schema, xmlNodePtr node){    xmlSchemaElementPtr decl = NULL;    xmlChar const* nsURI = get_node_nsURI(node);    TRACE("(%p, %p)/n", schema, node);    if (xmlStrEqual(nsURI, schema->targetNamespace))        decl = xmlHashLookup(schema->elemDecl, node->name);    if (!decl && xmlHashSize(schema->schemasImports) > 1)    {        FIXME("declaration not found in main schema - need to check schema imports!/n");        /*xmlSchemaImportPtr import;        if (nsURI == NULL)            import = xmlHashLookup(schema->schemasImports, XML_SCHEMAS_NO_NAMESPACE);        else            import = xmlHashLookup(schema->schemasImports, node->ns->href);        if (import != NULL)            decl = xmlHashLookup(import->schema->elemDecl, node->name);*/    }    return decl;}
开发者ID:ZoloZiak,项目名称:reactos,代码行数:25,


示例5: instance_annotation_callback

/* * This is called by ??? when reading an annotation is encountered * while reading the instance data. */xmlParserErrors instance_annotation_callback(void *handle, xmlNodePtr node){    int i;    char key[20];    xmlChar* path;    xmlDocPtr doc = node->doc;    xmlXPathContextPtr xpathCtx = xmlXPathNewContext(doc);    xmlXPathObjectPtr xpathObj;    sprintf(key, "%p", handle);    path = (xmlChar*)xmlHashLookup(Handle2Path, (xmlChar*)key);    assert(path != NULL);    printf("/noooooooooooo %s: %p/n", __FUNCTION__, handle);    dump_doc(node->doc, node);    /* walk_doc_tree(node, 0); */    printf("/n");    xpathCtx->node = node;    xpathObj = xmlXPathEvalExpression(path, xpathCtx);    if (xpathObj->nodesetval != NULL)	for (i = 0; i < xpathObj->nodesetval->nodeNr; ++i)	    printf("xpath(/"%s/") => %s/n", path,		   xmlNodeGetContent(xpathObj->nodesetval->nodeTab[i]));    return XML_ERR_OK;}
开发者ID:ericprud,项目名称:libxml-annot,代码行数:29,


示例6: xsltGetNamespace

/** * xsltGetNamespace: * @ctxt:  a transformation context * @cur:  the input node * @ns:  the namespace * @out:  the output node (or its parent) * * Find a matching (prefix and ns-name) ns-declaration * for the requested @ns->prefix and @ns->href in the result tree. * If none is found then a new ns-declaration will be * added to @resultElem. If, in this case, the given prefix is * already in use, then a ns-declaration with a modified ns-prefix * be we created. * * Called by: *  - xsltCopyPropList() (*not*  anymore) *  - xsltShallowCopyElement() *  - xsltCopyTreeInternal() (*not*  anymore) *  - xsltApplySequenceConstructor() (*not* in the refactored code), *  - xsltElement() (*not* anymore) * * Returns a namespace declaration or NULL in case of *         namespace fixup failures or API or internal errors. */xmlNsPtrxsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,	         xmlNodePtr out){    if (ns == NULL)	return(NULL);#ifdef XSLT_REFACTORED    /*    * Namespace exclusion and ns-aliasing is performed at    * compilation-time in the refactored code.    * Additionally, aliasing is not intended for non Literal    * Result Elements.    */    return(xsltGetSpecialNamespace(ctxt, cur, ns->href, ns->prefix, out));#else    {	xsltStylesheetPtr style;	const xmlChar *URI = NULL; /* the replacement URI */	if ((ctxt == NULL) || (cur == NULL) || (out == NULL))	    return(NULL);	style = ctxt->style;	while (style != NULL) {	    if (style->nsAliases != NULL)		URI = (const xmlChar *)		xmlHashLookup(style->nsAliases, ns->href);	    if (URI != NULL)		break;	    style = xsltNextImport(style);	}	if (URI == UNDEFINED_DEFAULT_NS) {	    return(xsltGetSpecialNamespace(ctxt, cur, NULL, NULL, out));#if 0	    /*	    * TODO: Removed, since wrong. If there was no default	    * namespace in the stylesheet then this must resolve to	    * the NULL namespace.	    */	    xmlNsPtr dflt;	    dflt = xmlSearchNs(cur->doc, cur, NULL);	    if (dflt != NULL)		URI = dflt->href;	    else		return NULL;#endif	} else if (URI == NULL)	    URI = ns->href;	return(xsltGetSpecialNamespace(ctxt, cur, URI, ns->prefix, out));    }#endif}
开发者ID:GYGit,项目名称:reactos,代码行数:82,


示例7: SchemaCache_validate_tree

HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree){    schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);    cache_entry* entry;    xmlChar const* ns = NULL;    TRACE("(%p, %p)/n", This, tree);    if (!tree)        return E_POINTER;    if ((xmlNodePtr)tree->doc == tree)    {        xmlNodePtr root = xmlDocGetRootElement(tree->doc);        if (root && root->ns)            ns = root->ns->href;    }    else if (tree->ns)    {        ns = tree->ns->href;    }    entry = xmlHashLookup(This->cache, ns);    /* TODO: if the ns is not in the cache, and it's a URL,     *       do we try to load from that? */    if (entry)    {        if (entry->type == SCHEMA_TYPE_XDR)        {            FIXME("partial stub: XDR schema support not implemented/n");            return S_OK;        }        else if (entry->type == SCHEMA_TYPE_XSD)        {            xmlSchemaValidCtxtPtr svctx;            int err;            /* TODO: if validateOnLoad property is false,             *       we probably need to validate the schema here. */            svctx = xmlSchemaNewValidCtxt(entry->schema);            xmlSchemaSetValidErrors(svctx, validate_error, validate_warning, NULL);#ifdef HAVE_XMLSCHEMASSETVALIDSTRUCTUREDERRORS            xmlSchemaSetValidStructuredErrors(svctx, validate_serror, NULL);#endif            if ((xmlNodePtr)tree->doc == tree)                err = xmlSchemaValidateDoc(svctx, (xmlDocPtr)tree);            else                err = xmlSchemaValidateOneElement(svctx, tree);            xmlSchemaFreeValidCtxt(svctx);            return err? S_FALSE : S_OK;        }    }    return E_FAIL;}
开发者ID:r6144,项目名称:wine,代码行数:55,


示例8: cache_copy

static void cache_copy(void* data, void* dest, xmlChar* name){    schema_cache* This = (schema_cache*) dest;    cache_entry* entry = (cache_entry*) data;    if (xmlHashLookup(This->cache, name) == NULL)    {        cache_entry_add_ref(entry);        xmlHashAddEntry(This->cache, name, entry);    }}
开发者ID:r6144,项目名称:wine,代码行数:11,


示例9: xsltGetKey

/** * xsltGetKey: * @ctxt: an XSLT transformation context * @name:  the key name or NULL * @nameURI:  the name URI or NULL * @value:  the key value to look for * * Looks up a key of the in current source doc (the document info * on @ctxt->document). Computes the key if not already done * for the current source doc. * * Returns the nodeset resulting from the query or NULL */xmlNodeSetPtrxsltGetKey(xsltTransformContextPtr ctxt, const xmlChar *name,	   const xmlChar *nameURI, const xmlChar *value) {    xmlNodeSetPtr ret;    xsltKeyTablePtr table;    int init_table = 0;    if ((ctxt == NULL) || (name == NULL) || (value == NULL) ||	(ctxt->document == NULL))	return(NULL);#ifdef WITH_XSLT_DEBUG_KEYS    xsltGenericDebug(xsltGenericDebugContext,	"Get key %s, value %s/n", name, value);#endif    /*     * keys are computed only on-demand on first key access for a document     */    if ((ctxt->document->nbKeysComputed < ctxt->nbKeys) &&        (ctxt->keyInitLevel == 0)) {        /*	 * If non-recursive behaviour, just try to initialize all keys	 */	if (xsltInitAllDocKeys(ctxt))	    return(NULL);    }retry:    table = (xsltKeyTablePtr) ctxt->document->keys;    while (table != NULL) {	if (((nameURI != NULL) == (table->nameURI != NULL)) &&	    xmlStrEqual(table->name, name) &&	    xmlStrEqual(table->nameURI, nameURI))	{	    ret = (xmlNodeSetPtr)xmlHashLookup(table->keys, value);	    return(ret);	}	table = table->next;    }    if ((ctxt->keyInitLevel != 0) && (init_table == 0)) {        /*	 * Apparently one key is recursive and this one is needed,	 * initialize just it, that time and retry	 */        xsltInitDocKeyTable(ctxt, name, nameURI);	init_table = 1;	goto retry;    }    return(NULL);}
开发者ID:Anthony-Mckale,项目名称:node-libxslt,代码行数:66,


示例10: CNTRLXMLGETReqHandler

/*********************************************************************** * Function Name : CNTRLXMLGETReqHandler * Description   : This function calls the registered callback functions 				   against the XML file URL * Input         : regUrl - XML file URL *				   pOutXMLStr - Response XML buffer * Output		 : none * Return value  : CNTRLXML_SUCCESS, CNTRLXML_FAILURE, CNTRLXML_BADPARAM ***********************************************************************/t_char8CNTRLXMLGETReqHandler (t_char8 * pInXMLFile, t_void * pAppData,                     t_char8 ** pOutXMLStr){  XMLTEMPLATE_CALLBACK_HANDLER pCbfun;  t_int32 retStatus = CNTRLXML_SUCCESS;  if (!pInXMLFile)  {    XML_Error ("pInXMLFile is NULL");    return CNTRLXML_BADPARAM;  }  XML_DebugArg ("Look up for tag = ", pInXMLFile);  pCbfun = xmlHashLookup (hTable, pInXMLFile);  if (pCbfun != NULL)  {    XML_DebugArg ("Found function for tag =", pInXMLFile);    retStatus = (*pCbfun) (pInXMLFile, pAppData);    if (retStatus != CNTRLXML_SUCCESS)    {      XML_Error ("GET Request CbkFunction Failed");      if(pXMLErrorStr)      {        *pOutXMLStr = xmlStrdup ((const xmlChar *) pXMLErrorStr);        XML_DebugArg ("*pOutXMLStr=", *pOutXMLStr);        XMLBUFFERFREE (pXMLErrorStr);        pXMLErrorStr = NULL;        return CNTRLXML_SUCCESS;      }      *pOutXMLStr = NULL;      return CNTRLXML_FAILURE;    }    /**pOutXMLStr = (t_char8*) T_malloc(T_strlen(pXMLResultStr)+1);    of_strcpy(*pOutXMLStr, pXMLResultStr);*/    *pOutXMLStr = xmlStrdup ((const xmlChar *) pXMLResultStr);    XML_DebugArg ("*pOutXMLStr=", *pOutXMLStr);    XMLBUFFERFREE (pXMLResultStr);    pXMLResultStr = NULL;    return CNTRLXML_SUCCESS;  }  return CNTRLXML_FAILURE;}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:62,


示例11: session_from_hargs

/* *  session_from_hargs * *  Return a session from a handler struct session key */struct session* session_from_hargs(struct handler_args* hargs,     xmlHashTablePtr sessions, struct qz_config* conf){     uint64_t etag_payload;    unsigned char session_id[9];        struct session* this_session;    etag_payload = validate_etag(hargs->conf->tagger_socket_path,         hargs->session_key);    if (etag_payload == 0){        fprintf(hargs->log, "%f %d %s:%d session key not validated/n",             gettime(), hargs->request_id, __func__, __LINE__);        return NULL;    }    memcpy(session_id, &etag_payload, 8);    session_id[8] = '/0';    this_session = xmlHashLookup(sessions, session_id);    if (this_session==NULL){        fprintf(hargs->log, "%f %d %s:%d null session from hash lookup/n",             gettime(), hargs->request_id, __func__, __LINE__);                return NULL;    }        if (this_session->integrity_token != conf->integrity_token){        // The last 64 bits of the session struct have been         // altered.  The session record is corrupted.        // Clean up the session        close_session(hargs, this_session);        fprintf(hargs->log,"%f %d %s:%d session closed for bad integrity token",            gettime(), hargs->request_id, __func__, __LINE__);                return NULL;    }    fprintf(hargs->log, "%f %d %s:%d user=%s/n",        gettime(), hargs->request_id, __func__, __LINE__,        this_session->user);    return this_session;}
开发者ID:johnkaiser,项目名称:qzforms,代码行数:57,


示例12: xar_link_lookup

static xar_file_t xar_link_lookup(xar_t x, dev_t dev, ino_t ino, xar_file_t f) {	char key[32];	xar_file_t ret;	memset(key, 0, sizeof(key));	snprintf(key, sizeof(key)-1, "%08" DEV_HEXSTRING "%08" INO_HEXSTRING, DEV_CAST dev, INO_CAST ino);	ret = xmlHashLookup(XAR(x)->ino_hash, BAD_CAST(key));	if( ret == NULL ) {		xmlHashAddEntry(XAR(x)->ino_hash, BAD_CAST(key), XAR_FILE(f));		return NULL;	}	return ret;}
开发者ID:ALEXGUOQ,项目名称:DocSets-for-iOS,代码行数:13,


示例13: R_libxmlTypeTable_lookup

USER_OBJECT_R_libxmlTypeTable_lookup(USER_OBJECT_ table, USER_OBJECT_ name, USER_OBJECT_ s_elType){   xmlHashTablePtr t;   USER_OBJECT_ ans;   void *p;   t = R_getExternalRef(table, NULL); /* R_libxmlTypeTableGetRef(table); */   p = xmlHashLookup(t, CHAR_DEREF(STRING_ELT(name, 0)));   ans = R_makeRefObject(p, CHAR_DEREF(STRING_ELT(s_elType, 0)));   return(ans);}
开发者ID:SvenDowideit,项目名称:clearlinux,代码行数:13,


示例14: xmlsec_KeyStoreFinalizeMethod

static void xmlsec_KeyStoreFinalizeMethod(xmlSecKeyStorePtr store) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyStoreFinalizeMethods, store->id->name);  args = Py_BuildValue((char *) "O", wrap_xmlSecKeyStorePtr(store));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  Py_XDECREF(result);}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:15,


示例15: xmlsec_KeyDataGetSizeMethod

static xmlSecKeyDataType xmlsec_KeyDataGetSizeMethod(xmlSecKeyDataPtr data) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataGetSizeMethods, data->id->name);  args = Py_BuildValue((char *) "O", wrap_xmlSecKeyDataPtr(data));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (PyInt_AsLong(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:15,


示例16: xmlsec_KeyDataGetIdentifierMethod

static const xmlChar* xmlsec_KeyDataGetIdentifierMethod(xmlSecKeyDataPtr data) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataGetIdentifierMethods, data->id->name);  args = Py_BuildValue((char *) "O", wrap_xmlSecKeyDataPtr(data));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return ((const xmlChar*)PyString_AsString(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:15,


示例17: xmlsec_KeyStoreInitializeMethod

static int xmlsec_KeyStoreInitializeMethod(xmlSecKeyStorePtr store) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyStoreInitializeMethods, store->id->name);  args = Py_BuildValue((char *) "O", wrap_xmlSecKeyStorePtr(store));  /* Protect refcount against reentrant manipulation of callback hash */  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (PyInt_AsLong(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:16,


示例18: xmlsec_KeyDataDebugDumpMethod

static void xmlsec_KeyDataDebugDumpMethod(xmlSecKeyDataPtr data, FILE *output) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataDebugDumpMethods, data->id->name);  args = Py_BuildValue((char *) "OO", wrap_xmlSecKeyDataPtr(data),		       PyFile_FromFile(output, NULL, NULL, NULL));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  Py_XDECREF(result);}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:16,


示例19: xmlsec_KeyDataDuplicateMethod

static int xmlsec_KeyDataDuplicateMethod(xmlSecKeyDataPtr dst,					 xmlSecKeyDataPtr src) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataDuplicateMethods, src->id->name);  args = Py_BuildValue((char *) "OO", wrap_xmlSecKeyDataPtr(dst),		       wrap_xmlSecKeyDataPtr(src));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (PyInt_AsLong(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:17,


示例20: CNTRLXMLGetRegHandler

/*********************************************************************** * Function Name : CNTRLXMLGetRegHandler * Description   : This function retrives registered callback functions 				   for the given Module name. * Input         : pInModule	- Module name * Output		 : pOutFunLst	- Registered function list * Return value  : CNTRLXML_SUCCESS, CNTRLXML_FAILURE, CNTRLXML_BADPARAM ***********************************************************************/t_char8CNTRLXMLGetRegHandler (t_char8 * pInModule, t_void ** pOutFunLst){  XML_DebugArg ("Look up for tag = ", pInModule);  *pOutFunLst = (t_void *) xmlHashLookup (pModSetTable, pInModule);  if (*pOutFunLst == NULL)  {    XML_DebugArg ("Could not find function for tag", pInModule);    return CNTRLXML_FAILURE;  }  XML_DebugArg ("Found function for tag = %s", pInModule);  return CNTRLXML_SUCCESS;}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:25,


示例21: xmlsec_GetKeyCallback

static xmlSecKeyPtr xmlsec_GetKeyCallback(xmlNodePtr keyInfoNode,					  xmlSecKeyInfoCtxPtr keyInfoCtx) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(GetKeyCallbacks,		       keyInfoCtx->keysMngr->keysStore->id->name);  args = Py_BuildValue((char *) "OO", wrap_xmlNodePtr(keyInfoNode),		       wrap_xmlSecKeyInfoCtxPtr(keyInfoCtx));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (xmlSecKeyPtr_get(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:18,


示例22: xmlsec_PtrDestroyItemMethod

static void xmlsec_PtrDestroyItemMethod(xmlSecPtr ptr) {  xmlSecPtrListPtr list;  PyObject *args, *result;  PyObject *func = NULL;  list = (xmlSecPtrListPtr) ptr;  func = xmlHashLookup(PtrDestroyItemMethods, list->id->name);  args = Py_BuildValue((char *) "O", wrap_xmlSecPtr(ptr));  /* Protect refcount against reentrant manipulation of callback hash */  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  Py_XDECREF(result);}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:18,


示例23: xmlsec_KeyDataXmlWriteMethod

static int xmlsec_KeyDataXmlWriteMethod(xmlSecKeyDataId id, xmlSecKeyPtr key,					xmlNodePtr node,					xmlSecKeyInfoCtxPtr keyInfoCtx) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataXmlWriteMethods, id->name);  args = Py_BuildValue((char *) "OOOO", wrap_xmlSecKeyDataId(id),		       wrap_xmlSecKeyPtr(key), wrap_xmlNodePtr(node),		       wrap_xmlSecKeyInfoCtxPtr(keyInfoCtx));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (PyInt_AsLong(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:19,


示例24: xmlsec_PtrDebugXmlDumpItemMethod

static void xmlsec_PtrDebugXmlDumpItemMethod(xmlSecPtr ptr, FILE *output) {  xmlSecPtrListPtr list;  PyObject *args, *result;  PyObject *func = NULL;  list = (xmlSecPtrListPtr) ptr;  func = xmlHashLookup(PtrDebugXmlDumpItemMethods, list->id->name);  /* FIXME */  args = Py_BuildValue((char *) "OO", wrap_xmlSecPtr(ptr),		       PyFile_FromFile(output, NULL, NULL, NULL));  /* Protect refcount against reentrant manipulation of callback hash */  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  Py_XDECREF(result);}
开发者ID:DeltaOS,项目名称:pyxmlsec,代码行数:20,


示例25: xsltCopyNamespaceList

/** * xsltCopyNamespaceList: * @ctxt:  a transformation context * @node:  the target node * @cur:  the first namespace * * Do a copy of an namespace list. If @node is non-NULL the * new namespaces are added automatically. This handles namespaces * aliases * * Returns: a new xmlNsPtr, or NULL in case of error. */xmlNsPtrxsltCopyNamespaceList(xsltTransformContextPtr ctxt, xmlNodePtr node,	              xmlNsPtr cur) {    xmlNsPtr ret = NULL;    xmlNsPtr p = NULL,q;    const xmlChar *URI;    if (cur == NULL)	return(NULL);    if (cur->type != XML_NAMESPACE_DECL)	return(NULL);    /*     * One can add namespaces only on element nodes     */    if ((node != NULL) && (node->type != XML_ELEMENT_NODE))	node = NULL;    while (cur != NULL) {	if (cur->type != XML_NAMESPACE_DECL)	    break;	if (!xmlStrEqual(cur->href, XSLT_NAMESPACE)) {	    /* TODO apply cascading */	    URI = (const xmlChar *) xmlHashLookup(ctxt->style->nsAliases,		                                  cur->href);	    if (URI != NULL) {		q = xmlNewNs(node, URI, cur->prefix);	    } else {		q = xmlNewNs(node, cur->href, cur->prefix);	    }	    if (p == NULL) {		ret = p = q;	    } else {		p->next = q;		p = q;	    }	}	cur = cur->next;    }    return(ret);}
开发者ID:gitpan,项目名称:AxKit-Needs,代码行数:53,


示例26: boxtree_movedir

// Move a dir to another path in the tree,// recursively updating all the child entries in allDirsvoid	boxtree_movedir(const char * from, const char * to){	boxdir * aDir = xmlHashLookup(allDirs, from);        list_iter it;        char * newfrom, * newto, *name;	if(!aDir) {	  syslog(LOG_ERR, "no such directory %s", from);	  return;	}        for (it=list_get_iter(aDir->folders); it; it = list_iter_next(it)) {            name = ((boxfile*)list_iter_getval(it))->name;            newfrom = pathappend(from, name);            newto   = pathappend(to,   name);            boxtree_movedir(newfrom, newto);            free(newfrom); free(newto);        }	//LOCKDIR(aDir);	xmlHashRemoveEntry(allDirs, from, NULL);	xmlHashAddEntry(allDirs, to, aDir);	//UNLOCKDIR(aDir);}
开发者ID:joeythesaint,项目名称:boxfs2,代码行数:23,


示例27: xmlsec_KeyDataBinReadMethod

static int xmlsec_KeyDataBinReadMethod(xmlSecKeyDataId id,				      xmlSecKeyPtr key,				      const xmlSecByte *buf,				      xmlSecSize bufSize,				      xmlSecKeyInfoCtxPtr keyInfoCtx) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyDataBinReadMethods, id->name);  args = Py_BuildValue((char *) "OOsiO", wrap_xmlSecKeyDataId(id),		       wrap_xmlSecKeyPtr(key), buf, bufSize,		       wrap_xmlSecKeyInfoCtxPtr(keyInfoCtx));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  Py_DECREF(func);  Py_DECREF(args);  return (PyInt_AsLong(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:21,


示例28: xmlsec_KeyStoreFindKeyMethod

static xmlSecKeyPtr xmlsec_KeyStoreFindKeyMethod(xmlSecKeyStorePtr store,						 xmlChar *name,						 xmlSecKeyInfoCtxPtr keyInfoCtx) {  PyObject *args, *result;  PyObject *func = NULL;  func = xmlHashLookup(KeyStoreFindKeyMethods, store->id->name);  args = Py_BuildValue((char *) "OsO", wrap_xmlSecKeyStorePtr(store), name,		       wrap_xmlSecKeyInfoCtxPtr(keyInfoCtx));  Py_INCREF(func);  result = PyEval_CallObject(func, args);  if (result == NULL) {    return (NULL);  }  Py_DECREF(func);  Py_DECREF(args);  return (xmlSecKeyPtr_get(result));}
开发者ID:dnet,项目名称:pyxmlsec,代码行数:21,


示例29: schema_cache_get

static HRESULT WINAPI schema_cache_get(IXMLDOMSchemaCollection2* iface, BSTR uri,                                       IXMLDOMNode** node){    schema_cache* This = impl_from_IXMLDOMSchemaCollection2(iface);    xmlChar* name;    cache_entry* entry;    TRACE("(%p)->(%s, %p)/n", This, wine_dbgstr_w(uri), node);    if (!node)        return E_POINTER;    name = xmlChar_from_wchar(uri);    entry = (cache_entry*) xmlHashLookup(This->cache, name);    heap_free(name);    /* TODO: this should be read-only */    if (entry)        return DOMDocument_create_from_xmldoc(entry->doc, (IXMLDOMDocument3**)node);    *node = NULL;    return S_OK;}
开发者ID:r6144,项目名称:wine,代码行数:22,



注:本文中的xmlHashLookup函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ xmlIsBlankNode函数代码示例
C++ xmlHasProp函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。