Pacemaker (ClusterLabs > Pacemaker) uses xmlRegisterNodeDefault() and xmlDeregisterNodeDefault() to automatically create and free a private data structure (xmlNode:_private
) at node creation and free time, respectively. I noticed today that they’re deprecated. Is there a non-deprecated alternative?
Unfortunately, there’s no drop-in replacement. You will have to populate the _private
data manually after creating nodes or for a whole tree after parsing, and deallocate the data before freeing node trees.
The node registration API is badly designed and interferes with other users of libxml2 in the same process unless you’re extremely careful. That said, I won’t remove any API functions as long as they’re still used by popular open-source projects. But it would be great if you could move away from this API in the next years.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.