[totem-pl-parser] xml: Add xml_parser_get_node_value() helper function
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] xml: Add xml_parser_get_node_value() helper function
- Date: Tue, 23 Feb 2021 17:07:28 +0000 (UTC)
commit 4587199a25029eb86f4632af4f4a0c3379e7308d
Author: crvi <crvisqr gmail com>
Date: Wed Sep 30 21:50:45 2020 +0530
xml: Add xml_parser_get_node_value() helper function
plparse/totem-pl-parser-podcast.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 6e69e0e..8f73484 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -98,6 +98,21 @@ totem_pl_parser_is_xml_feed (const char *data, gsize len)
#ifndef TOTEM_PL_PARSER_MINI
+static const char *
+xml_parser_get_node_value (xml_node_t *parent, const char *node_name)
+{
+ xml_node_t *child;
+
+ for (child = parent->child; child != NULL; child = child->next) {
+ if (child->name == NULL)
+ continue;
+ if (g_ascii_strcasecmp (child->name, node_name) == 0)
+ return child->data;
+ }
+
+ return NULL;
+}
+
static gboolean
is_image (const char *url)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]