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 co
| 947 | //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters |
| 948 | //! \return Pointer to found child, or 0 if not found. |
| 949 | xml_node<Ch> *first_node(const Ch *name_ = 0, std::size_t name_size_ = 0, bool case_sensitive = true) const |
| 950 | { |
| 951 | if (name_) |
| 952 | { |
| 953 | if (name_size_ == 0) |
| 954 | name_size_ = internal::measure(name_); |
| 955 | for (xml_node<Ch> *child = m_first_node; child; child = child->next_sibling()) |
| 956 | if (internal::compare(child->name(), child->name_size(), name_, name_size_, case_sensitive)) |
| 957 | return child; |
| 958 | return 0; |
| 959 | } |
| 960 | else |
| 961 | return m_first_node; |
| 962 | } |
| 963 | |
| 964 | //! Gets last child node, optionally matching node name. |
| 965 | //! Behaviour is undefined if node has no children. |
no test coverage detected