I wrote the code bellow to get CDATA node value too, I got the node\'s name, but the values are in blank.
I changed the parse Flags to parse_full, but it not worked
When you use CDATA
, RapidXML parses that as a separate node 'below' the outer element in the hierarchy.
Your code correctly gets 'title' by using nodeFrame->first_node()->name()
, but - because the CDATA
text is in a separate element, you'd need to use this to extract the value:
cout << "value: " <<nodeFrame->first_node()->first_node()->value();