Mercurial > pidgin
comparison src/xmlnode.h @ 14100:85144ba7d726
[gaim-migrate @ 16730]
Fix the documentation to indicate that the result of xmlnode_get_data() needs to be g_free'd
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Sun, 13 Aug 2006 02:18:28 +0000 |
| parents | 25e63008d3bb |
| children |
comparison
equal
deleted
inserted
replaced
| 14099:7b030f6ed1c3 | 14100:85144ba7d726 |
|---|---|
| 29 * The valid types for an xmlnode | 29 * The valid types for an xmlnode |
| 30 */ | 30 */ |
| 31 typedef enum _XMLNodeType | 31 typedef enum _XMLNodeType |
| 32 { | 32 { |
| 33 XMLNODE_TYPE_TAG, /**< Just a tag */ | 33 XMLNODE_TYPE_TAG, /**< Just a tag */ |
| 34 XMLNODE_TYPE_ATTRIB, /**< Has attributes */ | 34 XMLNODE_TYPE_ATTRIB, /**< Has attributes */ |
| 35 XMLNODE_TYPE_DATA /**< Has data */ | 35 XMLNODE_TYPE_DATA /**< Has data */ |
| 36 } XMLNodeType; | 36 } XMLNodeType; |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * An xmlnode. | 39 * An xmlnode. |
| 40 */ | 40 */ |
| 41 typedef struct _xmlnode | 41 typedef struct _xmlnode |
| 42 { | 42 { |
| 43 char *name; /**< The name of the node. */ | 43 char *name; /**< The name of the node. */ |
| 44 #ifdef HAVE_LIBXML | 44 #ifdef HAVE_LIBXML |
| 45 char *namespace; /**< The namespace of the node */ | 45 char *namespace; /**< The namespace of the node */ |
| 46 #endif | 46 #endif |
| 47 XMLNodeType type; /**< The type of the node. */ | 47 XMLNodeType type; /**< The type of the node. */ |
| 48 char *data; /**< The data for the node. */ | 48 char *data; /**< The data for the node. */ |
| 49 size_t data_sz; /**< The size of the data. */ | 49 size_t data_sz; /**< The size of the data. */ |
| 50 struct _xmlnode *parent; /**< The parent node or @c NULL.*/ | 50 struct _xmlnode *parent; /**< The parent node or @c NULL.*/ |
| 51 struct _xmlnode *child; /**< The child node or @c NULL.*/ | 51 struct _xmlnode *child; /**< The child node or @c NULL.*/ |
| 52 struct _xmlnode *lastchild; /**< The last child node or @c NULL.*/ | 52 struct _xmlnode *lastchild; /**< The last child node or @c NULL.*/ |
| 53 struct _xmlnode *next; /**< The next node or @c NULL. */ | 53 struct _xmlnode *next; /**< The next node or @c NULL. */ |
| 54 } xmlnode; | 54 } xmlnode; |
| 123 /** | 123 /** |
| 124 * Gets data from a node. | 124 * Gets data from a node. |
| 125 * | 125 * |
| 126 * @param node The node to get data from. | 126 * @param node The node to get data from. |
| 127 * | 127 * |
| 128 * @return The data from the node. | 128 * @return The data from the node. You must g_free |
| 129 * this string when finished using it. | |
| 129 */ | 130 */ |
| 130 char *xmlnode_get_data(xmlnode *node); | 131 char *xmlnode_get_data(xmlnode *node); |
| 131 | 132 |
| 132 /** | 133 /** |
| 133 * Sets an attribute for a node. | 134 * Sets an attribute for a node. |
