Exemplo n.º 1
0
string_t Parser::GetInnerXML(node n)
{
    Visit(n);
    std::ostringstream stream;
    for (node child = n.first_child(); child; child = child.next_sibling())
        child.print(stream, "", pugi::format_raw);
    return decode_utf8(stream.str());
}
Exemplo n.º 2
0
// Utility functions
void TextToStream(node n, std::ostringstream & stream)
{
    for (node child = n.first_child(); child; child = child.next_sibling())
    {
        pugi::xml_node_type type = child.type();
        if (type == pugi::node_pcdata || type == pugi::node_cdata)
            stream << child.value();
        else
            TextToStream(child, stream);
    }
}