Commit 7647b633 authored by Mathias Lorente's avatar Mathias Lorente Committed by Murray Cumming

Node::create_new_child_node(): Use the default namespace if none is specified.

* libxml++/nodes/node.cc: This is better than just ignoring it.
Bug #656110
parent d12777bc
2011-09-06 Mathias Lorente <mathias.lorente@free.fr>
Node::create_new_child_node(): Use the default namespace if none is specified.
* libxml++/nodes/node.cc: This is better than just ignoring it.
Bug #656110
2011-07-20 Murray Cumming <murrayc@murrayc.com>
ContentNode::get_content(): Fix a documentation typo.
......
......@@ -164,8 +164,12 @@ _xmlNode* Node::create_new_child_node(const Glib::ustring& name, const Glib::ust
#endif //LIBXMLCPP_EXCEPTIONS_ENABLED
}
//Ignore the namespace if none was specified:
if(!ns_prefix.empty())
if(ns_prefix.empty())
{
//Retrieve default namespace if it exists
ns = xmlSearchNs(impl_->doc, impl_, 0);
}
else
{
//Use the existing namespace if one exists:
ns = xmlSearchNs(impl_->doc, impl_, (const xmlChar*)ns_prefix.c_str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment