From 48dd1bd999f454c730feaa4c1c9c69854a28145e Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Mon, 29 Sep 2003 03:16:29 +0000 Subject: [PATCH] Fixed parsing of Text->Line nodes: removed artifact "== 0". git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@304 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/xml-label-04.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/glabels2/src/xml-label-04.c b/glabels2/src/xml-label-04.c index 7d05b782..2d9abd17 100644 --- a/glabels2/src/xml-label-04.c +++ b/glabels2/src/xml-label-04.c @@ -232,12 +232,14 @@ xml04_parse_text_props (xmlNodePtr object_node, if (xmlStrEqual (line_node->name, "Line")) { + gl_debug (DEBUG_XML, "->Line node"); + nodes = NULL; for (text_node = line_node->xmlChildrenNode; text_node != NULL; text_node = text_node->next) { - if (xmlStrEqual (text_node->name, "Field") == - 0) { + if (xmlStrEqual (text_node->name, "Field")) { + gl_debug (DEBUG_XML, "->Line->Field node"); node_text = g_new0 (glTextNode, 1); node_text->field_flag = TRUE; node_text->data = @@ -245,10 +247,13 @@ xml04_parse_text_props (xmlNodePtr object_node, nodes = g_list_append (nodes, node_text); } else if (xmlNodeIsText (text_node)) { + gl_debug (DEBUG_XML, "->Line->\"literal\" node"); node_text = g_new0 (glTextNode, 1); node_text->field_flag = FALSE; node_text->data = xmlNodeGetContent (text_node); + gl_debug (DEBUG_XML, "text = \"%s\"", + node_text->data); nodes = g_list_append (nodes, node_text); } else { -- 2.39.5