MCPcopy Create free account
hub / github.com/MyGUI/mygui / text_output_cdata

Function text_output_cdata

UnitTests/TestApp/pugixml.cpp:3401–3422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3399}
3400
3401PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s)
3402{
3403 do
3404 {
3405 writer.write('<', '!', '[', 'C', 'D');
3406 writer.write('A', 'T', 'A', '[');
3407
3408 const char_t* prev = s;
3409
3410 // look for ]]> sequence - we can't output it as is since it terminates CDATA
3411 while (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>'))
3412 ++s;
3413
3414 // skip ]] if we stopped at ]]>, > will go to the next CDATA section
3415 if (*s)
3416 s += 2;
3417
3418 writer.write(prev, static_cast<size_t>(s - prev));
3419
3420 writer.write(']', ']', '>');
3421 } while (*s);
3422}
3423
3424PUGI__FN void node_output_attributes(xml_buffered_writer& writer, const xml_node& node, unsigned int flags)
3425{

Callers 1

node_outputFunction · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected