HomeClusterLabs Projects

Refactor: libcrmcommon: New pcmk__xml_parse()

Description

Refactor: libcrmcommon: New pcmk__xml_parse()

Clean this up versus string2xml().

  • Use parse_xml_recover() macro.
  • Drop CRM_LOG_ASSERTs. It's not a programming error if a user supplied the string.
  • Log partial XML at info level.
  • Log unparsable string on one line. Breaking the messages at 80 characters (previously) made some sense for readability, but that makes it harder to grab and concatenate all lines to debug the XML.

This function doesn't strip text like pcmk__xml_read() does... hmm...

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

Details

Provenance
nrwahl2Authored on Feb 9 2024, 5:08 AM
Parents
rP9aedad3a0368: Refactor: libpacemaker: Clean up pcmk_verify.c somewhat
Branches
Unknown
Tags
Unknown