[evolution-rss/evolution-rss-0-2-0] fix parsing of node children
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss/evolution-rss-0-2-0] fix parsing of node children
- Date: Fri, 21 Jan 2011 05:58:44 +0000 (UTC)
commit e83c93cecf2944d5eb3f9893d5b22eca5c1946ca
Author: Lucian Langa <lucilanga gnome org>
Date: Fri Jan 21 07:54:33 2011 +0200
fix parsing of node children
src/parser.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index b605dca..ea673c1 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -634,13 +634,16 @@ layer_find_innerhtml (xmlNodePtr node,
const char *match, const char *submatch,
gchar *fail)
{
+ gchar *tmp;
+ xmlNodePtr tmpnode;
while (node!=NULL) {
-#ifdef RDF_DEBUG
- xmlDebugDumpNode (stdout, node, 32);
- printf("%s.\n", node->name);
-#endif
if (strcasecmp ((char *)node->name, match)==0 && node->children) {
- return (gchar *)layer_find(node->children->next, submatch, fail);
+ tmpnode = node->children;
+ while (tmpnode) {
+ if ((tmp = (gchar *)layer_find(tmpnode, submatch, NULL)))
+ return tmp;
+ tmpnode = tmpnode->next;
+ }
}
node = node->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]