+using doc_uptr =
+ std::unique_ptr<xmlDoc, lttng::memory::create_deleter_class<xmlDoc, xmlFreeDoc>::deleter>;
+
+/*
+ * Manage the global parser context of libxml2.
+ * There should only be one instance of this class per process.
+ */
+class global_parser_context {
+public:
+ global_parser_context()
+ {
+ xmlInitParser();
+ }
+
+ ~global_parser_context()
+ {
+ xmlCleanupParser();
+ }