gwenhywfar  4.99.8beta
Functions
xml2db.c File Reference
#include "xml2db_p.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/gwendate.h>
#include <ctype.h>
Include dependency graph for xml2db.c:

Go to the source code of this file.

Functions

int GWEN_Xml2Db (GWEN_XMLNODE *xmlNodeDocument, GWEN_XMLNODE *xmlNodeSchema, GWEN_DB_NODE *dbDestination)
 
void GWEN_Xml2Db_Context_EnterDocNode (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
void GWEN_Xml2Db_Context_free (GWEN_XML2DB_CONTEXT *ctx)
 
void GWEN_Xml2Db_Context_LeaveDocNode (GWEN_XML2DB_CONTEXT *ctx)
 
GWEN_XML2DB_CONTEXT * GWEN_Xml2Db_Context_new (GWEN_XMLNODE *documentRoot, GWEN_DB_NODE *dbRoot)
 
int GWEN_Xml2Db_ConvertAndSetCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value)
 
const char * GWEN_Xml2Db_GetCharValueByPath (GWEN_XMLNODE *xmlNode, const char *path, const char *defValue)
 
int GWEN_Xml2Db_Handle_DbCreateAndEnterGroup (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_DbCreateAndEnterTempGroup (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_DbSetCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_DbSetCharValue_internal (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent)
 
int GWEN_Xml2Db_Handle_DbSetTempCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlEnter (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlForEvery (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfCharDataMatches (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfHasCharData (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfNotCharDataMatches (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfNotHasCharData (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfNotPathExists (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_Handle_XmlIfPathExists (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db_HandleChildren (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 

Function Documentation

int GWEN_Xml2Db ( GWEN_XMLNODE xmlNodeDocument,
GWEN_XMLNODE xmlNodeSchema,
GWEN_DB_NODE dbDestination 
)

Definition at line 708 of file xml2db.c.

References DBG_INFO, GWEN_LOGDOMAIN, GWEN_Xml2Db_Context_free(), GWEN_Xml2Db_Context_new(), and GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

void GWEN_Xml2Db_Context_EnterDocNode ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 75 of file xml2db.c.

References GWEN_XMLNode_List2_PushBack().

Referenced by GWEN_Xml2Db_Handle_XmlEnter(), and GWEN_Xml2Db_Handle_XmlForEvery().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_Xml2Db_Context_free ( GWEN_XML2DB_CONTEXT *  ctx)

Definition at line 63 of file xml2db.c.

References GWEN_DB_Group_free(), GWEN_FREE_OBJECT, GWEN_XMLNode_List2_free(), and NULL.

Referenced by GWEN_Xml2Db().

Here is the call graph for this function:

Here is the caller graph for this function:

void GWEN_Xml2Db_Context_LeaveDocNode ( GWEN_XML2DB_CONTEXT *  ctx)

Definition at line 85 of file xml2db.c.

References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_XMLNode_List2_GetBack(), GWEN_XMLNode_List2_PopBack(), and NULL.

Referenced by GWEN_Xml2Db_Handle_XmlEnter(), and GWEN_Xml2Db_Handle_XmlForEvery().

Here is the call graph for this function:

Here is the caller graph for this function:

GWEN_XML2DB_CONTEXT* GWEN_Xml2Db_Context_new ( GWEN_XMLNODE documentRoot,
GWEN_DB_NODE dbRoot 
)

Definition at line 43 of file xml2db.c.

References GWEN_DB_Group_new(), GWEN_NEW_OBJECT, and GWEN_XMLNode_List2_new().

Referenced by GWEN_Xml2Db().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_ConvertAndSetCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode,
GWEN_DB_NODE dbCurrent,
const char *  value 
)
const char* GWEN_Xml2Db_GetCharValueByPath ( GWEN_XMLNODE xmlNode,
const char *  path,
const char *  defValue 
)
int GWEN_Xml2Db_Handle_DbCreateAndEnterGroup ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 327 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_DB_GetGroup(), GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_DbCreateAndEnterTempGroup ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 360 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_DB_GetGroup(), GWEN_DB_Group_free(), GWEN_DB_UnlinkGroup(), GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_DbSetCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 455 of file xml2db.c.

References GWEN_Xml2Db_Handle_DbSetCharValue_internal().

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_DbSetCharValue_internal ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode,
GWEN_DB_NODE dbCurrent 
)
int GWEN_Xml2Db_Handle_DbSetTempCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 461 of file xml2db.c.

References GWEN_Xml2Db_Handle_DbSetCharValue_internal().

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlEnter ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
int GWEN_Xml2Db_Handle_XmlForEvery ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
int GWEN_Xml2Db_Handle_XmlIfCharDataMatches ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 467 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Text_ComparePattern(), GWEN_Xml2Db_GetCharValueByPath(), GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlIfHasCharData ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 539 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Xml2Db_GetCharValueByPath(), GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlIfNotCharDataMatches ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 503 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Text_ComparePattern(), GWEN_Xml2Db_GetCharValueByPath(), GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlIfNotHasCharData ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 569 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Xml2Db_GetCharValueByPath(), GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlIfNotPathExists ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 624 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_PATHMUSTEXIST, GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetNodeByXPath(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_Handle_XmlIfPathExists ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)

Definition at line 596 of file xml2db.c.

References DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_PATHMUSTEXIST, GWEN_Xml2Db_HandleChildren(), GWEN_XMLNode_GetNodeByXPath(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by GWEN_Xml2Db_HandleChildren().

Here is the call graph for this function:

Here is the caller graph for this function:

int GWEN_Xml2Db_HandleChildren ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)