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

Go to the source code of this file.

Functions

void _freeData (GWEN_UNUSED void *bp, void *p)
static void GWENHYWFAR_CB _freeData (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]

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

Definition at line 88 of file xmlcmd_lxml.c.

References GWEN_DB_Group_free(), GWEN_FREE_OBJECT, and GWEN_UNUSED.

Here is the call graph for this function:

◆ _freeData() [2/2]

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

References _freeData(), _handleXmlPath(), _twoStrings_free(), _twoStrings_fromString(), _twoStrings_new(), and GWENHYWFAR_CB.

Here is the call graph for this function:

◆ _handleXmlPath()

◆ _twoStrings_free()

void _twoStrings_free ( GWEN_XMLCMD_LXML_TWOSTRINGS * ts)

Definition at line 600 of file xmlcmd_lxml.c.

References GWEN_FREE_OBJECT.

Referenced by _freeData(), 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 617 of file xmlcmd_lxml.c.

References _twoStrings_new(), and GWEN_Text_strndup().

Referenced by _freeData(), 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 590 of file xmlcmd_lxml.c.

References GWEN_NEW_OBJECT.

Referenced by _freeData(), and _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 217 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 271 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 290 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 152 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 191 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 139 of file xmlcmd_lxml.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_XmlCommanderLibXml_GetDocRoot()

xmlNodePtr GWEN_XmlCommanderLibXml_GetDocRoot ( const GWEN_XMLCOMMANDER * cmd)

Definition at line 100 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 363 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 178 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 327 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 240 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 66 of file xmlcmd_lxml.c.

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

Referenced by GWEN_XmlCommanderLibXml_new(), and 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 165 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 126 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 204 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 352 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 310 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 434 of file xmlcmd_lxml.c.

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

Here is the call graph for this function: