From: <vac...@us...> - 2008-12-16 18:24:52
|
Revision: 116 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=116&view=rev Author: vaclavslavik Date: 2008-12-16 18:24:46 +0000 (Tue, 16 Dec 2008) Log Message: ----------- added xml::node::get_namespace() function (patch #2102276) Modified Paths: -------------- trunk/NEWS trunk/include/xmlwrapp/node.h trunk/src/libxml/node.cxx Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-12-16 18:19:01 UTC (rev 115) +++ trunk/NEWS 2008-12-16 18:24:46 UTC (rev 116) @@ -25,6 +25,8 @@ PDF version of the manual is no longer provided, use HTML documentation included with xmlwrapp source distribution. + Added xml::node::get_namespace() function. + Version 0.5.1 Various compilation fixes. Modified: trunk/include/xmlwrapp/node.h =================================================================== --- trunk/include/xmlwrapp/node.h 2008-12-16 18:19:01 UTC (rev 115) +++ trunk/include/xmlwrapp/node.h 2008-12-16 18:24:46 UTC (rev 116) @@ -328,6 +328,17 @@ //#################################################################### /** + * Get the namespace of this xml::node. + * + * @return The namespace of this node or NULL if no namespace is + * associated. + * @author Vaclav Slavik + **/ + //#################################################################### + const char* get_namespace (void) const; + + //#################################################################### + /** * 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 2008-12-16 18:19:01 UTC (rev 115) +++ trunk/src/libxml/node.cxx 2008-12-16 18:24:46 UTC (rev 116) @@ -340,6 +340,12 @@ return pimpl_->attrs_; } //#################################################################### +const char *xml::node::get_namespace (void) const { + return pimpl_->xmlnode_->ns + ? reinterpret_cast<const char*>(pimpl_->xmlnode_->ns->href) + : NULL; +} +//#################################################################### 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. |