gwenhywfar  5.10.1
Functions
xmlcmd_lxml.c File Reference
#include "xmlcmd_lxml_p.h"
#include <gwenhywfar/debug.h>
#include <ctype.h>
Include dependency graph for xmlcmd_lxml.c:

Go to the source code of this file.

Functions

static void GWENHYWFAR_CB _freeData (void *bp, void *p)
 
void _freeData (GWEN_UNUSED void *bp, void *p)
 
static void * _handleXmlPath (const char *entry, void *data, int idx, uint32_t flags)
 
void _twoStrings_free (GWEN_XMLCMD_LXML_TWOSTRINGS *ts)
 
GWEN_XMLCMD_LXML_TWOSTRINGS * _twoStrings_fromString (const char *source, uint8_t delimiter)
 
GWEN_XMLCMD_LXML_TWOSTRINGS * _twoStrings_new ()
 
void GWEN_XmlCommanderLibXml_EnterDocNode (GWEN_XMLCOMMANDER *cmd, xmlNodePtr xNode)
 
xmlNodePtr GWEN_XmlCommanderLibXml_FindFirstElement (xmlNodePtr parent, const char *elemName)
 
xmlNodePtr GWEN_XmlCommanderLibXml_FindNextElement (xmlNodePtr elem, const char *elemName)
 
GWEN_DB_NODEGWEN_XmlCommanderLibXml_GetCurrentDbGroup (const GWEN_XMLCOMMANDER *cmd)
 
xmlNodePtr GWEN_XmlCommanderLibXml_GetCurrentDocNode (const GWEN_XMLCOMMANDER *cmd)
 
GWEN_DB_NODEGWEN_XmlCommanderLibXml_GetCurrentTempDbGroup (const GWEN_XMLCOMMANDER *cmd)
 
GWEN_DB_NODEGWEN_XmlCommanderLibXml_GetDbRoot (const GWEN_XMLCOMMANDER *cmd)
 
xmlNodePtr GWEN_XmlCommanderLibXml_GetDocRoot (const GWEN_XMLCOMMANDER *cmd)
 
int GWEN_XmlCommanderLibXml_GetIntValue (xmlNodePtr n, const char *path, int defValue)
 
GWEN_DB_NODEGWEN_XmlCommanderLibXml_GetTempDbRoot (const GWEN_XMLCOMMANDER *cmd)
 
const char * GWEN_XmlCommanderLibXml_GetXmlCharValue (xmlNodePtr n, const char *path, const char *defValue)
 
const char * GWEN_XmlCommanderLibXml_GetXmlCharValueByPath (xmlNodePtr elem, const char *path, const char *defValue)
 
xmlNodePtr GWEN_XmlCommanderLibXml_GetXmlNode (xmlNodePtr n, const char *path, uint32_t flags)
 
void GWEN_XmlCommanderLibXml_LeaveDocNode (GWEN_XMLCOMMANDER *cmd)
 
GWEN_XMLCOMMANDERGWEN_XmlCommanderLibXml_new (xmlNodePtr documentRoot, GWEN_DB_NODE *dbRoot)
 
void GWEN_XmlCommanderLibXml_SetCurrentDbGroup (GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db)
 
void GWEN_XmlCommanderLibXml_SetCurrentDocNode (GWEN_XMLCOMMANDER *cmd, xmlNodePtr n)
 
void GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup (GWEN_XMLCOMMANDER *cmd, GWEN_DB_NODE *db)
 
int GWEN_XmlCommanderLibXml_SetIntValue (xmlNodePtr n, const char *path, int value)
 
int GWEN_XmlCommanderLibXml_SetXmlCharValue (xmlNodePtr n, const char *path, const char *value)
 
void GWEN_XmlCommanderLibXml_SetXmlCharValueByPath (xmlNodePtr elem, const char *path, const char *value)
 

Function Documentation

◆ _freeData() [1/2]

static void GWENHYWFAR_CB _freeData ( void *  bp,
void *  p 
)
static

Referenced by GWEN_XmlCommanderLibXml_new().

Here is the caller graph for this function:

◆ _freeData() [2/2]

void _freeData ( GWEN_UNUSED void *  bp,
void *  p 
)

Definition at line 87 of file xmlcmd_lxml.c.

References GWEN_DB_Group_free(), and GWEN_FREE_OBJECT.

Here is the call graph for this function:

◆ _handleXmlPath()

void * _handleXmlPath ( const char *  entry,
void *  data,
int  idx,
uint32_t  flags 
)
static

◆ _twoStrings_free()

void _twoStrings_free ( GWEN_XMLCMD_LXML_TWOSTRINGS *  ts)

Definition at line 599 of file xmlcmd_lxml.c.

References GWEN_FREE_OBJECT.

Referenced by GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(), and GWEN_XmlCommanderLibXml_SetXmlCharValueByPath().

Here is the caller graph for this function:

◆ _twoStrings_fromString()

GWEN_XMLCMD_LXML_TWOSTRINGS * _twoStrings_fromString ( const char *  source,
uint8_t  delimiter 
)

Definition at line 616 of file xmlcmd_lxml.c.

References _twoStrings_new().

Referenced by GWEN_XmlCommanderLibXml_GetXmlCharValueByPath(), and GWEN_XmlCommanderLibXml_SetXmlCharValueByPath().

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

◆ _twoStrings_new()

GWEN_XMLCMD_LXML_TWOSTRINGS * _twoStrings_new ( )

Definition at line 589 of file xmlcmd_lxml.c.

References GWEN_NEW_OBJECT.

Referenced by _twoStrings_fromString().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_EnterDocNode()

void GWEN_XmlCommanderLibXml_EnterDocNode ( GWEN_XMLCOMMANDER cmd,
xmlNodePtr  xNode 
)

Definition at line 216 of file xmlcmd_lxml.c.

References DBG_ERROR, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.

Referenced by _handleXmlEnter(), and _handleXmlForEvery().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_FindFirstElement()

xmlNodePtr GWEN_XmlCommanderLibXml_FindFirstElement ( xmlNodePtr  parent,
const char *  elemName 
)

Definition at line 270 of file xmlcmd_lxml.c.

References NULL.

Referenced by _handleXmlForEvery().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_FindNextElement()

xmlNodePtr GWEN_XmlCommanderLibXml_FindNextElement ( xmlNodePtr  elem,
const char *  elemName 
)

Definition at line 289 of file xmlcmd_lxml.c.

References NULL.

Referenced by _handleXmlForEvery().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_GetCurrentDbGroup()

GWEN_DB_NODE* GWEN_XmlCommanderLibXml_GetCurrentDbGroup ( const GWEN_XMLCOMMANDER cmd)

Definition at line 151 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

Referenced by _handleDbCreateAndEnterGroup(), and _handleDbSetCharValue().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_GetCurrentDocNode()

xmlNodePtr GWEN_XmlCommanderLibXml_GetCurrentDocNode ( const GWEN_XMLCOMMANDER cmd)

◆ GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup()

GWEN_DB_NODE* GWEN_XmlCommanderLibXml_GetCurrentTempDbGroup ( const GWEN_XMLCOMMANDER cmd)

Definition at line 190 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

Referenced by _handleDbCreateAndEnterTempGroup(), _handleDbSetCharValue_internal(), and _handleDbSetTempCharValue().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_GetDbRoot()

GWEN_DB_NODE* GWEN_XmlCommanderLibXml_GetDbRoot ( const GWEN_XMLCOMMANDER cmd)

Definition at line 138 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_XmlCommanderLibXml_GetDocRoot()

xmlNodePtr GWEN_XmlCommanderLibXml_GetDocRoot ( const GWEN_XMLCOMMANDER cmd)

Definition at line 99 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_XmlCommanderLibXml_GetIntValue()

int GWEN_XmlCommanderLibXml_GetIntValue ( xmlNodePtr  n,
const char *  path,
int  defValue 
)

Definition at line 362 of file xmlcmd_lxml.c.

References GWEN_XmlCommanderLibXml_GetXmlCharValue(), and NULL.

Here is the call graph for this function:

◆ GWEN_XmlCommanderLibXml_GetTempDbRoot()

GWEN_DB_NODE* GWEN_XmlCommanderLibXml_GetTempDbRoot ( const GWEN_XMLCOMMANDER cmd)

Definition at line 177 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_XmlCommanderLibXml_GetXmlCharValue()

const char* GWEN_XmlCommanderLibXml_GetXmlCharValue ( xmlNodePtr  n,
const char *  path,
const char *  defValue 
)

Definition at line 326 of file xmlcmd_lxml.c.

References DBG_INFO, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_NAMEMUSTEXIST, and GWEN_XmlCommanderLibXml_GetXmlNode().

Referenced by GWEN_XmlCommanderLibXml_GetIntValue().

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

◆ GWEN_XmlCommanderLibXml_GetXmlCharValueByPath()

const char* GWEN_XmlCommanderLibXml_GetXmlCharValueByPath ( xmlNodePtr  elem,
const char *  path,
const char *  defValue 
)

◆ GWEN_XmlCommanderLibXml_GetXmlNode()

xmlNodePtr GWEN_XmlCommanderLibXml_GetXmlNode ( xmlNodePtr  n,
const char *  path,
uint32_t  flags 
)

◆ GWEN_XmlCommanderLibXml_LeaveDocNode()

void GWEN_XmlCommanderLibXml_LeaveDocNode ( GWEN_XMLCOMMANDER cmd)

Definition at line 239 of file xmlcmd_lxml.c.

References DBG_ERROR, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, and NULL.

Referenced by _handleXmlEnter(), and _handleXmlForEvery().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_new()

GWEN_XMLCOMMANDER* GWEN_XmlCommanderLibXml_new ( xmlNodePtr  documentRoot,
GWEN_DB_NODE dbRoot 
)

Definition at line 65 of file xmlcmd_lxml.c.

References _freeData(), GWEN_DB_Group_new(), GWEN_INHERIT_SETDATA, GWEN_NEW_OBJECT, and GWEN_XmlCommander_new().

Referenced by GWEN_XmlCommanderLibXml_toDb_new().

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

◆ GWEN_XmlCommanderLibXml_SetCurrentDbGroup()

void GWEN_XmlCommanderLibXml_SetCurrentDbGroup ( GWEN_XMLCOMMANDER cmd,
GWEN_DB_NODE db 
)

Definition at line 164 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

Referenced by _handleDbCreateAndEnterGroup().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_SetCurrentDocNode()

void GWEN_XmlCommanderLibXml_SetCurrentDocNode ( GWEN_XMLCOMMANDER cmd,
xmlNodePtr  n 
)

Definition at line 125 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup()

void GWEN_XmlCommanderLibXml_SetCurrentTempDbGroup ( GWEN_XMLCOMMANDER cmd,
GWEN_DB_NODE db 
)

Definition at line 203 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

Referenced by _handleDbCreateAndEnterTempGroup().

Here is the caller graph for this function:

◆ GWEN_XmlCommanderLibXml_SetIntValue()

int GWEN_XmlCommanderLibXml_SetIntValue ( xmlNodePtr  n,
const char *  path,
int  value 
)

Definition at line 351 of file xmlcmd_lxml.c.

References GWEN_XmlCommanderLibXml_SetXmlCharValue().

Here is the call graph for this function:

◆ GWEN_XmlCommanderLibXml_SetXmlCharValue()

int GWEN_XmlCommanderLibXml_SetXmlCharValue ( xmlNodePtr  n,
const char *  path,
const char *  value 
)

Definition at line 309 of file xmlcmd_lxml.c.

References DBG_INFO, GWEN_ERROR_GENERIC, GWEN_LOGDOMAIN, and GWEN_XmlCommanderLibXml_GetXmlNode().

Referenced by GWEN_XmlCommanderLibXml_SetIntValue().

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

◆ GWEN_XmlCommanderLibXml_SetXmlCharValueByPath()

void GWEN_XmlCommanderLibXml_SetXmlCharValueByPath ( xmlNodePtr  elem,
const char *  path,
const char *  value 
)

Definition at line 433 of file xmlcmd_lxml.c.

References _twoStrings_free(), _twoStrings_fromString(), and GWEN_XmlCommanderLibXml_GetXmlNode().

Here is the call graph for this function: