The xml tool project provides developers functions that uses the libxml2 library.
It provides an easy way to input and output configurations from/to xml files and handlers to deal with small or big xml databases.

Main Page | File List | File Members

nmap.h

00001 /* Xmltools project. 
00002  * The xml tool project provides developers functions that uses the libxml2 library. 
00003  * It provides an easy way to input and output configurations from/to xml files 
00004  * and handlers to deal with small or big xml databases.
00005  * Copyright (C) 2004 Nicholas Niro
00006  * 
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  * 
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 #ifndef __NMAP_H
00022 #define __NMAP_H
00023 
00024 /* nmap.h
00025  * node map for multiple node processing
00026  */
00027 
00028 
00029 /* this struct will be used to know 
00030  * how many and by what name 
00031  * the child nodes will be. 
00032  * an Example would be : 
00033  * <root> 
00034  *      <parent>
00035  *              <foo></foo>
00036  *              <bar></bar> 
00037  *      </parent>
00038  * <root>
00039  * this struct will be used to 
00040  * implement child nodes like 
00041  * <foo> and like <bar> to the parent node
00042  * <parent> and thus being able to duplicate
00043  * the node <parent> with his childs(create
00044  * an organised database). 
00045  * if we didnt use this then we 
00046  * would be with things like this 
00047  * <root> 
00048  *      <parent>
00049  *              <foo></foo>
00050  *      </parent>
00051  *      <parent>
00052  *              <bar></bar> 
00053  *      </parent>
00054  *  <root>
00055  * which is not really useful in xml
00056  */
00057 
00058 /* the Nmap_ functions are made to deal with this struct. Do NOT deal with it directly. */
00059 typedef struct node_map
00060 {
00061         char *root_name; /* the name of the xml root */
00062         char *parent_name; /* the name of the node parent */
00063         char **child_nodes; /* the pointer to a pointer of the childs */
00064         char **child_content; /* the pointer to a pointer to the childs's content */
00065         unsigned int total_child; /* the total child */
00066 }NODE_MAP;
00067 
00068 
00069 
00070 /* set of functions to deal with the struct node_map *n_map variable.
00071  *  they are used to configure the nodes to be repeated. todo
00072  */
00073 
00074 /* FIXME */
00075 extern int Nmap_AddRoot(char *rootname /* FIXME */);
00076 
00077 /* FIXME */
00078 extern int Nmap_Add(char *parent_name, /* FIXME */
00079                 char *child_name, /* FIXME */
00080                 char *content); /* FIXME */
00081 
00082 /* FIXME */
00083 extern int Nmap_Del(char *parent_name, /* FIXME */
00084                 char *child_name); /* FIXME */
00085 
00086 /* FIXME */
00087 extern char *Nmap_GetContent(char *child_name /* FIXME */ );
00088 
00089 /* FIXME */
00090 extern void Nmap_Clear();
00091 
00092 /* FIXME */
00093 extern void Nmap_PrintData();
00094 
00095 /* FIXME */
00096 extern void Nmap_ClearContent();
00097 
00098 /* FIXME */
00099 extern NODE_MAP *Nmap_GetData();
00100 
00101 /* FIXME */
00102 extern void Nmap_Clean();
00103 
00104 #endif


Generated on Sun Dec 26 16:25:54 2004 for XmlTools by  doxygen 1.3.9.1
SourceForge.net Logo