diff options
Diffstat (limited to 'eel/eel-xml-extensions.c')
-rw-r--r-- | eel/eel-xml-extensions.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/eel/eel-xml-extensions.c b/eel/eel-xml-extensions.c index 2bcd4477..de09b99f 100644 --- a/eel/eel-xml-extensions.c +++ b/eel/eel-xml-extensions.c @@ -43,12 +43,6 @@ eel_xml_get_children (xmlNodePtr parent) } xmlNodePtr -eel_xml_get_root_children (xmlDocPtr document) -{ - return eel_xml_get_children (xmlDocGetRootElement (document)); -} - -xmlNodePtr eel_xml_get_child_by_name_and_property (xmlNodePtr parent, const char *child_name, const char *property_name, @@ -78,29 +72,6 @@ eel_xml_get_child_by_name_and_property (xmlNodePtr parent, return NULL; } -/* return a child of the passed-in node with a matching name */ - -xmlNodePtr -eel_xml_get_child_by_name (xmlNodePtr parent, - const char *child_name) -{ - xmlNodePtr child; - - if (parent == NULL) - { - return NULL; - } - for (child = eel_xml_get_children (parent); child != NULL; child = child->next) - { - if (strcmp (child->name, child_name) == 0) - { - return child; - } - } - return NULL; -} - - xmlNodePtr eel_xml_get_root_child_by_name_and_property (xmlDocPtr document, const char *child_name, @@ -114,50 +85,6 @@ eel_xml_get_root_child_by_name_and_property (xmlDocPtr document, property_value); } -/** - * eel_xml_get_property_for_children - * - * Returns a list of the values for the specified property for all - * children of the node that have the specified name. - * - * @parent: xmlNodePtr representing the node in question. - * @child_name: child element name to look for - * @property: name of propety to reutnr for matching children that have the property - * - * Returns: A list of keywords. - * - **/ -GList * -eel_xml_get_property_for_children (xmlNodePtr parent, - const char *child_name, - const char *property_name) -{ - GList *properties; - xmlNode *child; - xmlChar *property; - - properties = NULL; - - for (child = eel_xml_get_children (parent); - child != NULL; - child = child->next) - { - if (strcmp (child->name, child_name) == 0) - { - property = xmlGetProp (child, property_name); - if (property != NULL) - { - properties = g_list_prepend (properties, - g_strdup (property)); - xmlFree (property); - } - } - } - - /* Reverse so you get them in the same order as the XML file. */ - return g_list_reverse (properties); -} - xmlChar * eel_xml_get_property_translated (xmlNodePtr parent, const char *property_name) |