summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 615d7d4..59ba5d7 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -3190,7 +3190,12 @@ namespace pugi
const char_t* xml_node::child_value_w(const char_t* name) const
{
- return child_w(name).child_value();
+ if (!_root) return PUGIXML_TEXT("");
+
+ for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling)
+ if (i->name && impl::strequalwild(name, i->name)) return xml_node(i).child_value();
+
+ return PUGIXML_TEXT("");
}
xml_attribute xml_node::first_attribute() const