HomeClusterLabs Projects

Refactor: libcrmcommon: Add more XML functions.

Description

Refactor: libcrmcommon: Add more XML functions.

create_xml_text_node is similar to create_xml_node, but also adds text
content to the new node. This just saves callers a step and makes using
create_xml_node more appealing in more places.

pcmkoutput_xml_node is similar to create_xml_node, but is useful for
formatted output funtions. Instead of taking a parent node, it takes a
pcmk
output_t and adds the new node as a child of whatever the current
list parent is. This is necessary to prevent leaking private data out
of the XML formatted output code.

And then, use these functions throughout.

Details

Provenance
clumensAuthored on Jul 8 2019, 3:58 PM
Parents
rPdc70c74e9b8b: Fix: libcrmcommon: Don't set fmt_name in pcmk__output_new.
Branches
Unknown
Tags
Unknown

Event Timeline