Function child

Synopsis

#include <src/pugixml.hpp>

xml_node child(const char_t *name) const

Description

Get child, attribute or next/previous sibling with the specified name.

Mentioned in

Source

Lines 5534-5542 in src/pugixml.cpp. Line 535 in src/pugixml.hpp.

PUGI__FN xml_node xml_node::child(const char_t* name_) const
{
    if (!_root) return xml_node();
    for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
        if (i->name && impl::strequal(name_, i->name)) return xml_node(i);
    return xml_node();
}





Add Discussion as Guest

Log in