26#ifndef _PURPLE_XMLNODE_H_
27#define _PURPLE_XMLNODE_H_
160#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_XMLNODE_C_)
198 const char *prefix,
const char *value);
350 const char *description,
const char *process);
xmlnode * parent
The parent node or NULL.
xmlnode * child
The child node or NULL.
xmlnode * lastchild
The last child node or NULL.
xmlnode * next
The next node or NULL.
XMLNodeType type
The type of the node.
size_t data_sz
The size of the data.
char * xmlns
The namespace of the node.
char * name
The name of the node.
char * data
The data for the node.
GHashTable * namespace_map
The namespace map.
char * prefix
The namespace prefix if any.
const char * xmlnode_get_attrib(const xmlnode *node, const char *attr)
Gets an attribute from a node.
xmlnode * xmlnode_from_file(const char *dir, const char *filename, const char *description, const char *process)
Creates a node from a XML File.
xmlnode * xmlnode_get_child(const xmlnode *parent, const char *name)
Gets a child node named name.
char * xmlnode_get_data_unescaped(const xmlnode *node)
Gets unescaped data from a node.
const char * xmlnode_get_prefix(const xmlnode *node)
Returns the prefix of a node.
void xmlnode_insert_child(xmlnode *parent, xmlnode *child)
Inserts a node into a node as a child.
void xmlnode_set_attrib_with_prefix(xmlnode *node, const char *attr, const char *prefix, const char *value)
Sets a prefixed attribute for a node.
xmlnode * xmlnode_get_parent(const xmlnode *child)
Gets the parent node.
void xmlnode_set_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns, const char *value)
Sets a namespaced attribute for a node.
void xmlnode_set_prefix(xmlnode *node, const char *prefix)
Sets the prefix of a node.
char * xmlnode_get_data(const xmlnode *node)
Gets (escaped) data from a node.
xmlnode * xmlnode_from_str(const char *str, gssize size)
Creates a node from a string of XML.
xmlnode * xmlnode_new(const char *name)
Creates a new xmlnode.
xmlnode * xmlnode_get_next_twin(xmlnode *node)
Gets the next node with the same name as node.
void xmlnode_insert_data(xmlnode *node, const char *data, gssize size)
Inserts data into a node.
xmlnode * xmlnode_new_child(xmlnode *parent, const char *name)
Creates a new xmlnode child.
void xmlnode_set_namespace(xmlnode *node, const char *xmlns)
Sets the namespace of a node.
_XMLNodeType
The valid types for an xmlnode.
@ XMLNODE_TYPE_ATTRIB
Has attributes.
@ XMLNODE_TYPE_DATA
Has data.
@ XMLNODE_TYPE_TAG
Just a tag.
void xmlnode_remove_attrib(xmlnode *node, const char *attr)
Removes an attribute from a node.
xmlnode * xmlnode_copy(const xmlnode *src)
Creates a new node from the source node.
void xmlnode_free(xmlnode *node)
Frees a node and all of its children.
char * xmlnode_to_formatted_str(const xmlnode *node, int *len)
Returns the node in a string of human readable xml.
void xmlnode_remove_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns)
Removes a namespaced attribute from a node.
void xmlnode_set_attrib_full(xmlnode *node, const char *attr, const char *xmlns, const char *prefix, const char *value)
Sets a namespaced attribute for a node.
const char * xmlnode_get_namespace(xmlnode *node)
Returns the namespace of a node.
void xmlnode_set_attrib(xmlnode *node, const char *attr, const char *value)
Sets an attribute for a node.
xmlnode * xmlnode_get_child_with_namespace(const xmlnode *parent, const char *name, const char *xmlns)
Gets a child node named name in a namespace.
const char * xmlnode_get_attrib_with_namespace(const xmlnode *node, const char *attr, const char *xmlns)
Gets a namespaced attribute from a node.
char * xmlnode_to_str(const xmlnode *node, int *len)
Returns the node in a string of xml.
enum _XMLNodeType XMLNodeType
The valid types for an xmlnode.