Support xml_node::child_value/text for parse_embed_pcdata
This commit is contained in:
parent
2874f6f21d
commit
8b01f8923c
@ -5464,6 +5464,10 @@ namespace pugi
|
|||||||
if (impl::is_text_node(i) && i->value)
|
if (impl::is_text_node(i) && i->value)
|
||||||
return 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("");
|
return PUGIXML_TEXT("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6211,6 +6215,10 @@ namespace pugi
|
|||||||
if (impl::is_text_node(node))
|
if (impl::is_text_node(node))
|
||||||
return 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user