{
if(encoding.empty())
{
- //If we don't specify this to the xmlDocDump* functions (using 0 instead),
+ //If we don't specify this to the xmlDocDump* functions (using nullptr instead),
//then some other encoding is used, causing them to fail on non-ASCII characters.
return "UTF-8";
}
{
auto dtd = xmlGetIntSubset(impl_);
if(!dtd)
- return 0;
+ return nullptr;
if(!dtd->_private)
dtd->_private = new Dtd(dtd);
{
auto dtd = xmlCreateIntSubset(impl_,
(const xmlChar*)name.c_str(),
- external_id.empty() ? (const xmlChar*)0 : (const xmlChar*)external_id.c_str(),
- system_id.empty() ? (const xmlChar*)0 : (const xmlChar*)system_id.c_str());
+ external_id.empty() ? nullptr : (const xmlChar*)external_id.c_str(),
+ system_id.empty() ? nullptr : (const xmlChar*)system_id.c_str());
if (dtd && !dtd->_private)
dtd->_private = new Dtd(dtd);
{
auto root = xmlDocGetRootElement(impl_);
if(root == nullptr)
- return 0;
+ return nullptr;
else
{
Node::create_wrapper(root);
const Glib::ustring& ns_uri,
const Glib::ustring& ns_prefix)
{
- auto node = xmlNewDocNode(impl_, 0, (const xmlChar*)name.c_str(), 0);
+ auto node = xmlNewDocNode(impl_, nullptr, (const xmlChar*)name.c_str(), nullptr);
if (!node)
throw internal_error("Could not create root element node " + name);
bool recursive)
{
if (!node)
- return 0;
+ return nullptr;
//Create the node, by copying:
auto imported_node = xmlDocCopyNode(const_cast<xmlNode*>(node->cobj()), impl_, recursive);
const Glib::ustring& content)
{
auto entity = xmlAddDocEntity( impl_, (const xmlChar*) name.c_str(), type,
- publicId.empty() ? (const xmlChar*)0 : (const xmlChar*)publicId.c_str(),
- systemId.empty() ? (const xmlChar*)0 : (const xmlChar*)systemId.c_str(),
+ publicId.empty() ? nullptr : (const xmlChar*)publicId.c_str(),
+ systemId.empty() ? nullptr : (const xmlChar*)systemId.c_str(),
(const xmlChar*) content.c_str() );
if (!entity)
throw internal_error("Could not add entity declaration " + name);