|
From: <vac...@us...> - 2009-01-05 23:33:55
|
Revision: 124
http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=124&view=rev
Author: vaclavslavik
Date: 2009-01-05 23:33:51 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
added xml::node::set_namespace() too
Modified Paths:
--------------
trunk/NEWS
trunk/include/xmlwrapp/node.h
trunk/src/libxml/node.cxx
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-01-03 12:08:34 UTC (rev 123)
+++ trunk/NEWS 2009-01-05 23:33:51 UTC (rev 124)
@@ -25,7 +25,7 @@
PDF version of the manual is no longer provided, use HTML documentation
included with xmlwrapp source distribution.
- Added xml::node::get_namespace() function.
+ Added xml::node::get_namespace() and set_namespace() functions.
Added new constructor to the xml::node class for creating text nodes,
using xml::node::text helper struct.
Modified: trunk/include/xmlwrapp/node.h
===================================================================
--- trunk/include/xmlwrapp/node.h 2009-01-03 12:08:34 UTC (rev 123)
+++ trunk/include/xmlwrapp/node.h 2009-01-05 23:33:51 UTC (rev 124)
@@ -374,6 +374,17 @@
//####################################################################
/**
+ * Sets the namespace of this xml::node.
+ *
+ * @param href URI of the namespace to associate with the node.
+ * @author Vaclav Slavik
+ * @since 0.6.0
+ **/
+ //####################################################################
+ void set_namespace(const char *href);
+
+ //####################################################################
+ /**
* Find out if this node is a text node or sometiming like a text node,
* CDATA for example.
*
Modified: trunk/src/libxml/node.cxx
===================================================================
--- trunk/src/libxml/node.cxx 2009-01-03 12:08:34 UTC (rev 123)
+++ trunk/src/libxml/node.cxx 2009-01-05 23:33:51 UTC (rev 124)
@@ -364,6 +364,10 @@
: NULL;
}
//####################################################################
+void xml::node::set_namespace (const char *href) {
+ xmlNewNs(pimpl_->xmlnode_, reinterpret_cast<const xmlChar*>(href), 0);
+}
+//####################################################################
bool xml::node::is_text (void) const {
return xmlNodeIsText(pimpl_->xmlnode_) != 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|