⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icxmlnode.h

📁 IBE是一种非对称密码技术
💻 H
字号:
/* Copyright 2003-2006, Voltage Security, all rights reserved.
*/

#include "vibe.h"
#include "environment.h"
#include "base.h"
#include "libctx.h"
#include "icTable.h"
#include "stringutil.h"

#ifndef _ICXMLNODE_H_
#define _ICXMLNODE_H_

#ifdef __cplusplus
extern "C" {
#endif

#define IC_XML_NODE_TAG   0
#define IC_XML_NODE_TEXT  1

typedef struct icXmlNodeType 
{
	int                     node_type;
	char                   *text;
	char                   *tag_name;
	icTable                *attributes;
	struct icXmlNodeType  **children;
	int                     num_children;
} icXmlNode;

/* This creates a xml node.  Valid types include IC_XML_NODE_(TAG|TEXT).
 */
int icXmlNodeCreate (
   icXmlNode **node,
   int node_type,
   VoltLibCtx *libCtx
   );

/* Frees all memory associated with the node including children nodes.
 */
void icXmlNodeFree (
   icXmlNode **node,
   VoltLibCtx *libCtx
   );

/* Adds a child to a node. Never use this to create a non-tree
 * structure.
 * Note that to use this function, the caller must first create the new
 * node, then add it. But once it's added to the parent, the child will
 * be freed when the parent is freed. That is, if you add a child,
 * don't free the child, just free the parent.
 */
int icXmlNodeAddChild (
   icXmlNode *parent,
   icXmlNode *child,
   VoltLibCtx *libCtx
   );

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -