Struct
PurpleXmlNode
Description [src]
struct PurpleXmlNode {
char* name;
char* xmlns;
PurpleXmlNodeType type;
char* data;
size_t data_sz;
PurpleXmlNode* parent;
PurpleXmlNode* child;
PurpleXmlNode* lastchild;
PurpleXmlNode* next;
char* prefix;
GHashTable* namespace_map;
}
XmlNode is a simplified API for handling XML. An XmlNode represents an XML element and has API for children as well as attributes.
Structure members
name
The name of the node.
xmlns
The namespace of the node.
type
The type of the node.
data
The data for the node.
data_sz
The size of the data.
parent
The parent node or
NULL
.child
The child node or
NULL
.lastchild
The last child node or
NULL
.next
The next node or
NULL
.prefix
The namespace prefix if any.
namespace_map
The namespace map.
Functions
purple_xmlnode_from_file
Creates a node from a XML File. Calling this on the root node of an XML document will parse the entire document into a tree of nodes, and return the PurpleXmlNode of the root.
unstable since: 3.0
purple_xmlnode_from_str
Creates a node from a string of XML. Calling this on the root node of an XML document will parse the entire document into a tree of nodes, and return the PurpleXmlNode of the root.
unstable since: 3.0
Instance methods
purple_xmlnode_get_attrib_with_namespace
Gets a namespaced attribute from a node.
unstable since: 3.0
purple_xmlnode_get_child_with_namespace
Gets a child node named name in a namespace.
unstable since: 3.0
purple_xmlnode_get_default_namespace
Returns the current default namespace. The default namespace is the current namespace which applies to child elements which are unprefixed and which do not contain their own namespace.
unstable since: 3.0
purple_xmlnode_remove_attrib_with_namespace
Removes a namespaced attribute from a node.
unstable since: 3.0
purple_xmlnode_strip_prefixes
Remove all element prefixes from an PurpleXmlNode tree. The prefix’s namespace is transformed into the default namespace for an element.
unstable since: 3.0
purple_xmlnode_to_formatted_str
Returns the node in a string of human readable xml.
unstable since: 3.0