|
gwenhywfar
5.10.1
|
#include "xml_p.h"#include "xmlctx_l.h"#include "i18n_l.h"#include <gwenhywfar/debug.h>#include <gwenhywfar/misc.h>#include <gwenhywfar/text.h>#include <gwenhywfar/path.h>#include <gwenhywfar/fastbuffer.h>#include <gwenhywfar/syncio_file.h>#include <gwenhywfar/syncio_memory.h>#include <stdlib.h>#include <assert.h>#include <string.h>#include <ctype.h>#include <sys/types.h>#include <errno.h>#include "xmlrw.c"#include "xmlglobalize.c"
Go to the source code of this file.
Macros | |
| #define | DISABLE_DEBUGLOG |
| #define | GWEN_XML_BUFFERSIZE 512 |
| #define GWEN_XML_BUFFERSIZE 512 |
Definition at line 60 of file xml.c.
Referenced by GWEN_XML__ReadAllFromIo(), and GWEN_XMLContext_ReadFromIo().
| int GWEN_XML_AddNameSpace | ( | GWEN_STRINGLIST2 * | sl, |
| const char * | prefix, | ||
| const char * | name | ||
| ) |
Definition at line 1424 of file xml.c.
References GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_StringList2_AppendString(), and GWEN_StringList2_IntertMode_NoDouble.
Referenced by GWEN_XMLNode__CheckNameSpaceDecls1().


| const char* GWEN_XML_FindNameSpace | ( | GWEN_STRINGLIST2 * | sl, |
| const char * | prefix, | ||
| const char * | name | ||
| ) |
Definition at line 1501 of file xml.c.
References GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_StringList2_First(), GWEN_StringList2Iterator_Data(), GWEN_StringList2Iterator_free(), and GWEN_StringList2Iterator_Next().

| const char* GWEN_XML_FindNameSpaceByName | ( | GWEN_STRINGLIST2 * | sl, |
| const char * | s | ||
| ) |
Definition at line 1471 of file xml.c.
References GWEN_StringList2_First(), GWEN_StringList2Iterator_Data(), GWEN_StringList2Iterator_free(), and GWEN_StringList2Iterator_Next().
Referenced by GWEN_XMLNode__CheckNameSpaceDecls1().


| const char* GWEN_XML_FindNameSpaceByPrefix | ( | GWEN_STRINGLIST2 * | sl, |
| const char * | s | ||
| ) |
Definition at line 1444 of file xml.c.
References GWEN_StringList2_First(), GWEN_StringList2Iterator_Data(), GWEN_StringList2Iterator_free(), and GWEN_StringList2Iterator_Next().

| int GWEN_XMLNode__CheckAndSetNameSpace | ( | GWEN_XMLNODE * | n, |
| const char * | prefix, | ||
| const char * | nspace | ||
| ) |
Definition at line 1652 of file xml.c.
References DBG_DEBUG, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_LOGDOMAIN, GWEN_XMLNode__SetProperty(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_XMLNode__SetNameSpaces().


| int GWEN_XMLNode__CheckNameSpaceDecls1 | ( | GWEN_XMLNODE * | n, |
| GWEN_STRINGLIST2 * | sl, | ||
| const char * | currentNameSpace | ||
| ) |
Definition at line 1542 of file xml.c.
References DBG_ERROR, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_LOGDOMAIN, GWEN_Memory_dealloc(), GWEN_Memory_strdup(), GWEN_XML_AddNameSpace(), GWEN_XML_FindNameSpaceByName(), GWEN_XMLNode_GetFirstTag(), GWEN_XMLNode_GetNextTag(), GWEN_XMLNode_GetXPath(), GWEN_XMLProperty_del(), and GWEN_XMLProperty_free().
Referenced by GWEN_XMLNode_NormalizeNameSpaces().


| int GWEN_XMLNode__CheckNameSpaceDecls3 | ( | GWEN_XMLNODE * | n | ) |
Definition at line 1760 of file xml.c.
References DBG_DEBUG, GWEN_LOGDOMAIN, GWEN_XMLNode__SetNameSpaces(), GWEN_XMLNode_GetFirstTag(), GWEN_XMLNode_GetNextTag(), GWEN_XMLProperty_del(), and GWEN_XMLProperty_free().
Referenced by GWEN_XMLNode_NormalizeNameSpaces().


| int GWEN_XMLNode__SetNameSpaces | ( | GWEN_XMLNODE * | n, |
| const char * | prefix, | ||
| const char * | nspace | ||
| ) |
Definition at line 1729 of file xml.c.
References GWEN_XMLNode__CheckAndSetNameSpace(), GWEN_XMLNode_GetFirstTag(), and GWEN_XMLNode_GetNextTag().
Referenced by GWEN_XMLNode__CheckNameSpaceDecls3().


| void GWEN_XMLNode__SetProperty | ( | GWEN_XMLNODE * | n, |
| const char * | name, | ||
| const char * | value, | ||
| int | doInsert | ||
| ) |
Definition at line 290 of file xml.c.
References GWEN_Memory_dealloc(), GWEN_Memory_strdup(), GWEN_XMLProperty_add(), GWEN_XMLProperty_insert(), and GWEN_XMLProperty_new().
Referenced by GWEN_XMLNode__CheckAndSetNameSpace(), GWEN_XMLNode_SetIntProperty(), and GWEN_XMLNode_SetProperty().


| GWEN_XMLNODE* GWEN_XMLNode_FindTag | ( | const GWEN_XMLNODE * | n, |
| const char * | tname, | ||
| const char * | pname, | ||
| const char * | pvalue | ||
| ) |
Definition at line 743 of file xml.c.
References GWEN_Text_ComparePattern(), GWEN_XMLNode_GetNextTag(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_XMLNode_FindFirstTag(), and GWEN_XMLNode_FindNextTag().


| GWEN_XMLNODE* GWEN_XMLNode_GetFirstOfType | ( | const GWEN_XMLNODE * | n, |
| GWEN_XMLNODE_TYPE | t | ||
| ) |
Definition at line 674 of file xml.c.
References GWEN_XMLNode_GetChild(), and GWEN_XMLNode_Next().
Referenced by GWEN_XMLNode_GetFirstData(), and GWEN_XMLNode_GetFirstTag().


| GWEN_XMLPROPERTY* GWEN_XMLNode_GetFirstProperty | ( | const GWEN_XMLNODE * | n | ) |
| GWEN_XMLNODE* GWEN_XMLNode_GetNextOfType | ( | const GWEN_XMLNODE * | n, |
| GWEN_XMLNODE_TYPE | t | ||
| ) |
Definition at line 691 of file xml.c.
References GWEN_XMLNode_Next().
Referenced by GWEN_XMLNode_GetNextData(), and GWEN_XMLNode_GetNextTag().


| GWEN_XMLPROPERTY* GWEN_XMLNode_GetNextProperty | ( | const GWEN_XMLNODE * | n, |
| const GWEN_XMLPROPERTY * | pr | ||
| ) |
| void* GWEN_XMLNode_HandlePath | ( | const char * | entry, |
| void * | data, | ||
| int | idx, | ||
| uint32_t | flags | ||
| ) |
Definition at line 1201 of file xml.c.
References DBG_ERROR, DBG_VERBOUS, GWEN_LOGDOMAIN, GWEN_PATH_FLAGS_CREATE_GROUP, GWEN_PATH_FLAGS_CREATE_VAR, GWEN_PATH_FLAGS_LAST, GWEN_PATH_FLAGS_NAMEMUSTEXIST, GWEN_PATH_FLAGS_NAMEMUSTNOTEXIST, GWEN_PATH_FLAGS_PATHCREATE, GWEN_PATH_FLAGS_PATHMUSTEXIST, GWEN_PATH_FLAGS_PATHMUSTNOTEXIST, GWEN_PATH_FLAGS_ROOT, GWEN_PATH_FLAGS_VARIABLE, GWEN_XMLNode_AddChild(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_FindNextTag(), GWEN_XMLNode_new(), and GWEN_XMLNodeTypeTag.
Referenced by GWEN_XMLNode_GetNodeByXPath().


| GWEN_XMLNODE_NAMESPACE* GWEN_XMLNode_NameSpace_dup | ( | const GWEN_XMLNODE_NAMESPACE * | ns | ) |
Definition at line 2021 of file xml.c.
References GWEN_XMLNode_NameSpace_new().
Referenced by GWEN_XMLNode_AddNameSpace(), and GWEN_XMLNode_dup().


| void GWEN_XMLNode_NameSpace_free | ( | GWEN_XMLNODE_NAMESPACE * | ns | ) |
Definition at line 2009 of file xml.c.
References GWEN_FREE_OBJECT, and GWEN_LIST_FINI.
Referenced by GWEN_XmlCtxStore_AddAttr().

| const char* GWEN_XMLNode_NameSpace_GetName | ( | const GWEN_XMLNODE_NAMESPACE * | ns | ) |
Definition at line 2032 of file xml.c.
Referenced by GWEN_XMLGL__GetNameSpaceByPrefix(), GWEN_XMLGL__TranslateName(), GWEN_XMLNode__WriteNamespacesToStream(), and GWEN_XMLNode_FindNameSpaceByName().

| const char* GWEN_XMLNode_NameSpace_GetUrl | ( | const GWEN_XMLNODE_NAMESPACE * | ns | ) |
Definition at line 2040 of file xml.c.
Referenced by GWEN_XMLGL__FindNameSpaceByUrl(), GWEN_XMLGL__SampleNameSpaces(), GWEN_XMLGL__TranslateName(), GWEN_XMLNode__WriteNamespacesToStream(), and GWEN_XMLNode_FindNameSpaceByUrl().

| GWEN_XMLNODE_NAMESPACE* GWEN_XMLNode_NameSpace_new | ( | const char * | name, |
| const char * | url | ||
| ) |
Definition at line 1991 of file xml.c.
References GWEN_LIST_INIT, GWEN_Memory_strdup(), and GWEN_NEW_OBJECT.
Referenced by GWEN_XmlCtxStore_AddAttr(), GWEN_XMLGL__SampleNameSpaces(), and GWEN_XMLNode_NameSpace_dup().


| void GWEN_XMLProperty_add | ( | GWEN_XMLPROPERTY * | p, |
| GWEN_XMLPROPERTY ** | head | ||
| ) |
Definition at line 111 of file xml.c.
References GWEN_LIST_ADD.
Referenced by GWEN_XMLNode__SetProperty(), GWEN_XMLNode_CopyProperties(), and GWEN_XMLNode_dup().

| void GWEN_XMLProperty_del | ( | GWEN_XMLPROPERTY * | p, |
| GWEN_XMLPROPERTY ** | head | ||
| ) |
Definition at line 124 of file xml.c.
References GWEN_LIST_DEL.
Referenced by GWEN_XMLNode__CheckNameSpaceDecls1(), and GWEN_XMLNode__CheckNameSpaceDecls3().

| GWEN_XMLPROPERTY* GWEN_XMLProperty_dup | ( | const GWEN_XMLPROPERTY * | p | ) |
Definition at line 98 of file xml.c.
References GWEN_XMLProperty_new().
Referenced by GWEN_XMLNode_CopyProperties(), and GWEN_XMLNode_dup().


| void GWEN_XMLProperty_free | ( | GWEN_XMLPROPERTY * | p | ) |
Definition at line 86 of file xml.c.
References GWEN_FREE_OBJECT, and GWEN_Memory_dealloc().
Referenced by GWEN_XMLNode__CheckNameSpaceDecls1(), GWEN_XMLNode__CheckNameSpaceDecls3(), and GWEN_XMLProperty_freeAll().


| void GWEN_XMLProperty_freeAll | ( | GWEN_XMLPROPERTY * | p | ) |
Definition at line 130 of file xml.c.
References GWEN_XMLProperty_free().
Referenced by GWEN_XMLNode_free().


| const char* GWEN_XMLProperty_GetName | ( | const GWEN_XMLPROPERTY * | pr | ) |
| const char* GWEN_XMLProperty_GetValue | ( | const GWEN_XMLPROPERTY * | pr | ) |
| void GWEN_XMLProperty_insert | ( | GWEN_XMLPROPERTY * | p, |
| GWEN_XMLPROPERTY ** | head | ||
| ) |
Definition at line 118 of file xml.c.
References GWEN_LIST_INSERT.
Referenced by GWEN_XMLNode__SetProperty().

| GWEN_XMLPROPERTY* GWEN_XMLProperty_new | ( | const char * | name, |
| const char * | value | ||
| ) |
Definition at line 72 of file xml.c.
References GWEN_Memory_strdup(), and GWEN_NEW_OBJECT.
Referenced by GWEN_XMLNode__SetProperty(), and GWEN_XMLProperty_dup().


1.8.14