gwenhywfar  5.3.0
Functions
xml2db_todb.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_todb.c:

Go to the source code of this file.

Functions

static int _convertAndSetCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value)
 
int _convertAndSetCharValue (GWEN_UNUSED GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent, const char *value)
 
static const char * _getCharValueByPath (GWEN_XMLNODE *xmlNode, const char *path, const char *defValue)
 
static int _handleChildren_toDb (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleDbCreateAndEnterGroup (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleDbCreateAndEnterTempGroup (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleDbSetCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleDbSetCharValue_internal (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode, GWEN_DB_NODE *dbCurrent)
 
static int _handleDbSetTempCharValue (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlEnter (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlForEvery (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfCharDataMatches (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfHasCharData (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfNotCharDataMatches (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfNotHasCharData (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfNotPathExists (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
static int _handleXmlIfPathExists (GWEN_XML2DB_CONTEXT *ctx, GWEN_XMLNODE *xmlNode)
 
int GWEN_Xml2Db (GWEN_XMLNODE *xmlNodeDocument, GWEN_XMLNODE *xmlNodeSchema, GWEN_DB_NODE *dbDestination)
 

Function Documentation

◆ _convertAndSetCharValue() [1/2]

static int _convertAndSetCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode,
GWEN_DB_NODE dbCurrent,
const char *  value 
)
static

Referenced by _handleDbSetCharValue_internal().

Here is the caller graph for this function:

◆ _convertAndSetCharValue() [2/2]

int _convertAndSetCharValue ( GWEN_UNUSED GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode,
GWEN_DB_NODE dbCurrent,
const char *  value 
)

◆ _getCharValueByPath()

const char * _getCharValueByPath ( GWEN_XMLNODE xmlNode,
const char *  path,
const char *  defValue 
)
static

◆ _handleChildren_toDb()

int _handleChildren_toDb ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

◆ _handleDbCreateAndEnterGroup()

int _handleDbCreateAndEnterGroup ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 332 of file xml2db_todb.c.

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

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleDbCreateAndEnterTempGroup()

int _handleDbCreateAndEnterTempGroup ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 366 of file xml2db_todb.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_Context_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleDbSetCharValue()

int _handleDbSetCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 466 of file xml2db_todb.c.

References _handleDbSetCharValue_internal().

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleDbSetCharValue_internal()

int _handleDbSetCharValue_internal ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode,
GWEN_DB_NODE dbCurrent 
)
static

◆ _handleDbSetTempCharValue()

int _handleDbSetTempCharValue ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 473 of file xml2db_todb.c.

References _handleDbSetCharValue_internal().

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlEnter()

int _handleXmlEnter ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

◆ _handleXmlForEvery()

int _handleXmlForEvery ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

◆ _handleXmlIfCharDataMatches()

int _handleXmlIfCharDataMatches ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 480 of file xml2db_todb.c.

References _getCharValueByPath(), DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Text_ComparePattern(), GWEN_Xml2Db_Context_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlIfHasCharData()

int _handleXmlIfHasCharData ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 554 of file xml2db_todb.c.

References _getCharValueByPath(), DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Xml2Db_Context_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlIfNotCharDataMatches()

int _handleXmlIfNotCharDataMatches ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 517 of file xml2db_todb.c.

References _getCharValueByPath(), DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Text_ComparePattern(), GWEN_Xml2Db_Context_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlIfNotHasCharData()

int _handleXmlIfNotHasCharData ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 585 of file xml2db_todb.c.

References _getCharValueByPath(), DBG_ERROR, DBG_INFO, GWEN_ERROR_INVALID, GWEN_LOGDOMAIN, GWEN_Xml2Db_Context_HandleChildren(), GWEN_XMLNode_GetProperty(), and NULL.

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlIfNotPathExists()

int _handleXmlIfNotPathExists ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 642 of file xml2db_todb.c.

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

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _handleXmlIfPathExists()

int _handleXmlIfPathExists ( GWEN_XML2DB_CONTEXT *  ctx,
GWEN_XMLNODE xmlNode 
)
static

Definition at line 613 of file xml2db_todb.c.

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

Referenced by _handleChildren_toDb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Xml2Db()

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

Definition at line 79 of file xml2db_todb.c.

References _handleChildren_toDb(), DBG_INFO, GWEN_LOGDOMAIN, GWEN_Xml2Db_Context_free(), GWEN_Xml2Db_Context_HandleChildren(), and GWEN_Xml2Db_Context_new().

Here is the call graph for this function: