MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / node_output_simple

Function node_output_simple

Source/ThirdParty/pugixml/pugixml.cpp:3538–3592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3536 }
3537
3538 PUGI__FN void node_output_simple(xml_buffered_writer& writer, xml_node_struct* node, unsigned int flags)
3539 {
3540 const char_t* default_name = PUGIXML_TEXT(":anonymous");
3541
3542 switch (PUGI__NODETYPE(node))
3543 {
3544 case node_pcdata:
3545 text_output(writer, node->value ? node->value : PUGIXML_TEXT(""), ctx_special_pcdata, flags);
3546 break;
3547
3548 case node_cdata:
3549 text_output_cdata(writer, node->value ? node->value : PUGIXML_TEXT(""));
3550 break;
3551
3552 case node_comment:
3553 node_output_comment(writer, node->value ? node->value : PUGIXML_TEXT(""));
3554 break;
3555
3556 case node_pi:
3557 writer.write('<', '?');
3558 writer.write_string(node->name ? node->name : default_name);
3559
3560 if (node->value)
3561 {
3562 writer.write(' ');
3563 node_output_pi_value(writer, node->value);
3564 }
3565
3566 writer.write('?', '>');
3567 break;
3568
3569 case node_declaration:
3570 writer.write('<', '?');
3571 writer.write_string(node->name ? node->name : default_name);
3572 node_output_attributes(writer, node, flags);
3573 writer.write('?', '>');
3574 break;
3575
3576 case node_doctype:
3577 writer.write('<', '!', 'D', 'O', 'C');
3578 writer.write('T', 'Y', 'P', 'E');
3579
3580 if (node->value)
3581 {
3582 writer.write(' ');
3583 writer.write_string(node->value);
3584 }
3585
3586 writer.write('>');
3587 break;
3588
3589 default:
3590 assert(!"Invalid node type");
3591 }
3592 }
3593
3594 enum indent_flags_t
3595 {

Callers 1

node_outputFunction · 0.85

Calls 7

text_outputFunction · 0.85
text_output_cdataFunction · 0.85
node_output_commentFunction · 0.85
node_output_pi_valueFunction · 0.85
node_output_attributesFunction · 0.85
write_stringMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected