libxml++ r180 - in trunk: . libxml++



Author: murrayc
Date: Sat Aug 16 21:25:27 2008
New Revision: 180
URL: http://svn.gnome.org/viewvc/libxml++?rev=180&view=rev

Log:
2008-08-16  Murray Cumming  <murrayc murrayc com>

* libxml++/attribute.cc: get_value(): xmlGetNsProp() takes the 
namespace URI, not the prefix.
Bug #547689 (Sergei Fedorov)

Modified:
   trunk/ChangeLog
   trunk/libxml++/attribute.cc

Modified: trunk/libxml++/attribute.cc
==============================================================================
--- trunk/libxml++/attribute.cc	(original)
+++ trunk/libxml++/attribute.cc	Sat Aug 16 21:25:27 2008
@@ -22,17 +22,17 @@
 
 Glib::ustring Attribute::get_name() const
 {
-  return cobj()->name ? (char*)cobj()->name : "";
+  return cobj()->name ? (char*)cobj()->name : Glib::ustring();
 }
 
 Glib::ustring Attribute::get_value() const
 {
-  const xmlChar* ns_prefix = NULL;
+  const xmlChar* ns_uri = NULL;
   if(cobj()->ns)
-    ns_prefix = cobj()->ns->prefix;
+    ns_uri = cobj()->ns->href;
 
-  xmlChar *value = xmlGetNsProp(cobj()->parent, cobj()->name, ns_prefix);
-  Glib::ustring retn = value ? (char *)value : "";
+  xmlChar *value = xmlGetNsProp(cobj()->parent, cobj()->name, ns_uri);
+  const Glib::ustring retn = value ? (char*)value : Glib::ustring();
   xmlFree(value);
   return retn;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]