MCPcopy Create free account
hub / github.com/cinience/RedisStudio / first_node

Method first_node

include/rapidxml/rapidxml.hpp:936–949  ·  view source on GitHub ↗

Gets first child node, optionally matching node name. \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero \param name_size Size of name, in characters, or 0 to have size calculated automatically from string \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comp

Source from the content-addressed store, hash-verified

934 //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
935 //! \return Pointer to found child, or 0 if not found.
936 xml_node<Ch> *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
937 {
938 if (name)
939 {
940 if (name_size == 0)
941 name_size = internal::measure(name);
942 for (xml_node<Ch> *child = m_first_node; child; child = child->next_sibling())
943 if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive))
944 return child;
945 return 0;
946 }
947 else
948 return m_first_node;
949 }
950
951 //! Gets last child node, optionally matching node name.
952 //! Behaviour is undefined if node has no children.

Callers 5

count_childrenFunction · 0.80
node_iteratorMethod · 0.80
clone_nodeMethod · 0.80
print_childrenFunction · 0.80
print_element_nodeFunction · 0.80

Calls 5

measureFunction · 0.85
compareFunction · 0.85
next_siblingMethod · 0.80
nameMethod · 0.80
name_sizeMethod · 0.80

Tested by

no test coverage detected