HomeClusterLabs Projects

Refactor: libcrmcommon: New pcmk__xml_dump()

Description

Refactor: libcrmcommon: New pcmk__xml_dump()

To replace dump_xml_formatted(), dump_xml_formatted_with_text(), and
dump_xml_unformatted().

I don't see why we have a readable XML function that excludes text
nodes... not aware of a reason we couldn't print everything. Maybe start
doing that and drop the pcmk__xml_fmt_text flag at 3.0.0?

dump_xml_formatted_with_text() was added by 524c4d6 because we needed
text for a particular use case. Previously, there was only "formatted"
and "unformatted". There's a reasonable chance that it would be okay to
include text for both, and that excluding text (59c2413) was done only
out of caution. Prior to 59c2413, we dumped only element nodes.

Of course the reasoning for excluding text was not provided in 59c2413.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Feb 10 2024, 1:03 AM
Parents
rP8cb5c7455112: Refactor: libcrmcommon: Functionize writing compressed data to stream
Branches
Unknown
Tags
Unknown