[libgdata/gxml] * use get_content instead of node_list_to_string, because get content will treat special characters
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/gxml] * use get_content instead of node_list_to_string, because get content will treat special characters
- Date: Tue, 27 Sep 2011 15:49:11 +0000 (UTC)
commit 0ad80611a54e96d3d47b7f207a8cbad63fa842d0
Author: Richard Schwarting <aquarichy gmail com>
Date: Mon Sep 26 21:45:11 2011 -0400
* use get_content instead of node_list_to_string, because get content will treat special characters like <> as internal text and return them as <> without escaping them, while stringifying nodes will escape text content like <> into <, etc, to distinguish it from XML.
gdata/gdata-parser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-parser.c b/gdata/gdata-parser.c
index 7bdab8e..2142abb 100644
--- a/gdata/gdata-parser.c
+++ b/gdata/gdata-parser.c
@@ -378,7 +378,7 @@ gdata_parser_string_from_element (GXmlDomXNode *element, const gchar *element_na
}
/* Get the string and check it for NULLness or emptiness */
- text = gxml_dom_node_list_to_string (gxml_dom_xnode_get_child_nodes (element), TRUE);
+ text = gxml_dom_element_get_content (GXML_DOM_ELEMENT (element));
if ((options & P_REQUIRED && text == NULL) || (options & P_NON_EMPTY && text != NULL && *text == '\0')) {
g_free (text); // TODO:GXML: make sure return value of node_list_to_string (and other to_strings) is alloc'd
*success = gdata_parser_error_required_content_missing (element, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]