mirror of
https://github.com/RPCS3/pugixml.git
synced 2026-01-31 01:25:21 +01:00
Support xml_node::child_value/text for parse_embed_pcdata
This commit is contained in:
@@ -5464,6 +5464,10 @@ namespace pugi
|
||||
if (impl::is_text_node(i) && i->value)
|
||||
return i->value;
|
||||
|
||||
// element nodes can have value if parse_embed_pcdata was used
|
||||
if (PUGI__NODETYPE(_root) == node_element && _root->value)
|
||||
return _root->value;
|
||||
|
||||
return PUGIXML_TEXT("");
|
||||
}
|
||||
|
||||
@@ -6211,6 +6215,10 @@ namespace pugi
|
||||
if (impl::is_text_node(node))
|
||||
return node;
|
||||
|
||||
// element nodes can have value if parse_embed_pcdata was used
|
||||
if (PUGI__NODETYPE(_root) == node_element && _root->value)
|
||||
return _root;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user