Top | ![]() |
![]() |
![]() |
![]() |
|
e_xml_to_hash () |
|
e_xml_from_hash () |
|
e_xml_destroy_hash () |
|
(*EXmlHashFunc) () |
|
(*EXmlHashRemoveFunc) () |
EXmlHash * | e_xmlhash_new () |
|
e_xmlhash_add () |
|
e_xmlhash_remove () |
EXmlHashStatus | e_xmlhash_compare () |
|
e_xmlhash_foreach_key () |
|
e_xmlhash_foreach_key_remove () |
|
e_xmlhash_write () |
|
e_xmlhash_destroy () |
GHashTable * e_xml_to_hash (,
xmlDoc *docEXmlHashType type
);
Creates a doc
.
If type
is * E_XML_HASH_TYPE_PROPERTY
, all XML nodes will be
indexed in the type
is
E_XML_HASH_TYPE_OBJECT_UID
, then XML objects will be indexed in
the hash by their UID (other nodes will still be indexed by name).
xmlDoc * e_xml_from_hash (,
GHashTable *hashEXmlHashType type
,const
);gchar *root_name
Uses the key/value pair representation of an XML structure in hash
to build an equivalent e_xml_to_hash()
.
[skip]
hash |
The |
[element-type utf8 utf8] |
type |
The EXmlHashType used to store the XML |
|
root_name |
The name to call the new |
void e_xml_destroy_hash ();
GHashTable *hash
Frees the memory used by hash
and its contents.
gboolean (*EXmlHashRemoveFunc) (const
,gchar *keyconst
,gchar *value);
gpointer user_data
EXmlHash *
e_xmlhash_new (const gchar *filename
);
Creates a new EXmlHash from the file filename
. If filename
does
not already exist, an empty EXmlHash will be created.
[skip]
void e_xmlhash_add (EXmlHash *hash
,const
,gchar *keyconst
);gchar *data
Adds a new key/value pair to the EXmlHash hash
.
hash |
the EXmlHash to add an entry to |
|
key |
the key to use for the entry |
|
data |
the value of the new entry |
void e_xmlhash_remove (EXmlHash *hash
,const
);gchar *key
Remove the entry in hash
with key equal to key
, if it exists.
EXmlHashStatus e_xmlhash_compare (EXmlHash *hash
,const
,gchar *keyconst
);gchar *compare_data
Compares the value with key equal to key
in hash
against
compare_data
.
hash |
the EXmlHash to compare against |
|
key |
the key of the hash entry to compare with |
|
compare_data |
the data to compare against the hash entry |
void e_xmlhash_foreach_key (EXmlHash *hash
,EXmlHashFunc func
,);
gpointer user_data
Executes func
against each key/value pair in hash
.
hash |
an EXmlHash |
|
func |
the EXmlHashFunc to execute on the data in |
[scope async] |
user_data |
the data to pass to |
void e_xmlhash_foreach_key_remove (EXmlHash *hash
,EXmlHashRemoveFunc func
,);
gpointer user_data
Calls g_hash_table_foreach_remove()
hash
's internal hash
table. See g_hash_table_foreach_remove()
hash |
an EXmlHash |
|
func |
the EXmlHashFunc to execute on the data in |
[scope async] |
user_data |
the data to pass to |
void e_xmlhash_write (EXmlHash *hash
);
Writes the XML represented by hash
to the file originally passed
to e_xmlhash_new()
.