pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
Macros | Functions
xml.c File Reference
#include <crm_internal.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <glib.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlstring.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include "crmcommon_private.h"
#include <crm/common/xml_compat.h>
Include dependency graph for xml.c:

Go to the source code of this file.

Macros

#define XML_VERSION   ((pcmkXmlStr) "1.0")
 libxml2 supports only XML version 1.0, at least as of libxml2-2.12.5 More...
 

Functions

bool pcmk__xml_tree_foreach (xmlNode *xml, bool(*fn)(xmlNode *, void *), void *user_data)
 
bool pcmk__tracking_xml_changes (xmlNode *xml, bool lazy)
 
void pcmk__xml_set_parent_flags (xmlNode *xml, uint64_t flags)
 
void pcmk__set_xml_doc_flag (xmlNode *xml, enum xml_private_flags flag)
 
void pcmk__mark_xml_node_dirty (xmlNode *xml)
 
bool pcmk__xml_reset_node_flags (xmlNode *xml, void *user_data)
 
void pcmk__xml_new_private_data (xmlNode *xml)
 
void pcmk__xml_free_private_data (xmlNode *xml)
 
void xml_track_changes (xmlNode *xml, const char *user, xmlNode *acl_source, bool enforce_acls)
 
bool xml_tracking_changes (xmlNode *xml)
 
bool xml_document_dirty (xmlNode *xml)
 
int pcmk__xml_position (const xmlNode *xml, enum xml_private_flags ignore_if_set)
 
xmlNode * pcmk__xml_match (const xmlNode *haystack, const xmlNode *needle, bool exact)
 
void xml_accept_changes (xmlNode *xml)
 
xmlDoc * pcmk__xml_new_doc (void)
 
void pcmk__xml_free_doc (xmlDoc *doc)
 
bool pcmk__xml_is_name_start_char (const char *utf8, int *len)
 
bool pcmk__xml_is_name_char (const char *utf8, int *len)
 
void pcmk__xml_sanitize_id (char *id)
 
void pcmk__xml_free_node (xmlNode *xml)
 
void pcmk__xml_free (xmlNode *xml)
 
xmlNode * pcmk__xml_copy (xmlNode *parent, xmlNode *src)
 
void pcmk__strip_xml_text (xmlNode *xml)
 
bool pcmk__xml_needs_escape (const char *text, enum pcmk__xml_escape_type type)
 
gchar * pcmk__xml_escape (const char *text, enum pcmk__xml_escape_type type)
 
void xml_calculate_significant_changes (xmlNode *old_xml, xmlNode *new_xml)
 
void xml_calculate_changes (xmlNode *old_xml, xmlNode *new_xml)
 
void pcmk__xml_init (void)
 
void pcmk__xml_cleanup (void)
 
char * pcmk__xml_artefact_root (enum pcmk__xml_artefact_ns ns)
 
char * pcmk__xml_artefact_path (enum pcmk__xml_artefact_ns ns, const char *filespec)
 
xmlNode * copy_xml (xmlNode *src)
 
void crm_xml_init (void)
 
void crm_xml_cleanup (void)
 
void pcmk_free_xml_subtree (xmlNode *xml)
 
void free_xml (xmlNode *child)
 
void crm_xml_sanitize_id (char *id)
 

Macro Definition Documentation

◆ XML_VERSION

#define XML_VERSION   ((pcmkXmlStr) "1.0")

libxml2 supports only XML version 1.0, at least as of libxml2-2.12.5

Definition at line 31 of file xml.c.

Function Documentation

◆ copy_xml()

xmlNode* copy_xml ( xmlNode *  src_node)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 1545 of file xml.c.

◆ crm_xml_cleanup()

void crm_xml_cleanup ( void  )
Deprecated:
Exit with crm_exit() instead

Definition at line 1565 of file xml.c.

◆ crm_xml_init()

void crm_xml_init ( void  )
Deprecated:
Call crm_log_init() or crm_log_cli_init() instead

Definition at line 1559 of file xml.c.

◆ crm_xml_sanitize_id()

void crm_xml_sanitize_id ( char *  id)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 1583 of file xml.c.

◆ free_xml()

void free_xml ( xmlNode *  child)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 1577 of file xml.c.

◆ pcmk__mark_xml_node_dirty()

void pcmk__mark_xml_node_dirty ( xmlNode *  xml)

Definition at line 107 of file xml.c.

◆ pcmk__set_xml_doc_flag()

void pcmk__set_xml_doc_flag ( xmlNode *  xml,
enum xml_private_flags  flag 
)

Definition at line 96 of file xml.c.

◆ pcmk__strip_xml_text()

void pcmk__strip_xml_text ( xmlNode *  xml)

Definition at line 843 of file xml.c.

◆ pcmk__tracking_xml_changes()

bool pcmk__tracking_xml_changes ( xmlNode *  xml,
bool  lazy 
)

Definition at line 69 of file xml.c.

◆ pcmk__xml_artefact_path()

char* pcmk__xml_artefact_path ( enum pcmk__xml_artefact_ns  ns,
const char *  filespec 
)

Definition at line 1520 of file xml.c.

◆ pcmk__xml_artefact_root()

char* pcmk__xml_artefact_root ( enum pcmk__xml_artefact_ns  ns)

Definition at line 1463 of file xml.c.

◆ pcmk__xml_cleanup()

void pcmk__xml_cleanup ( void  )

Definition at line 1456 of file xml.c.

◆ pcmk__xml_copy()

xmlNode* pcmk__xml_copy ( xmlNode *  parent,
xmlNode *  src 
)

Definition at line 805 of file xml.c.

◆ pcmk__xml_escape()

gchar* pcmk__xml_escape ( const char *  text,
enum pcmk__xml_escape_type  type 
)

Definition at line 964 of file xml.c.

◆ pcmk__xml_free()

void pcmk__xml_free ( xmlNode *  xml)

Definition at line 789 of file xml.c.

◆ pcmk__xml_free_doc()

void pcmk__xml_free_doc ( xmlDoc *  doc)

Definition at line 495 of file xml.c.

◆ pcmk__xml_free_node()

void pcmk__xml_free_node ( xmlNode *  xml)

Definition at line 696 of file xml.c.

◆ pcmk__xml_free_private_data()

void pcmk__xml_free_private_data ( xmlNode *  xml)

Definition at line 340 of file xml.c.

◆ pcmk__xml_init()

void pcmk__xml_init ( void  )

Definition at line 1430 of file xml.c.

◆ pcmk__xml_is_name_char()

bool pcmk__xml_is_name_char ( const char *  utf8,
int *  len 
)

Definition at line 591 of file xml.c.

◆ pcmk__xml_is_name_start_char()

bool pcmk__xml_is_name_start_char ( const char *  utf8,
int *  len 
)

Definition at line 520 of file xml.c.

◆ pcmk__xml_match()

xmlNode* pcmk__xml_match ( const xmlNode *  haystack,
const xmlNode *  needle,
bool  exact 
)

Definition at line 428 of file xml.c.

◆ pcmk__xml_needs_escape()

bool pcmk__xml_needs_escape ( const char *  text,
enum pcmk__xml_escape_type  type 
)

Definition at line 882 of file xml.c.

◆ pcmk__xml_new_doc()

xmlDoc* pcmk__xml_new_doc ( void  )

Definition at line 479 of file xml.c.

◆ pcmk__xml_new_private_data()

void pcmk__xml_new_private_data ( xmlNode *  xml)

Definition at line 328 of file xml.c.

◆ pcmk__xml_position()

int pcmk__xml_position ( const xmlNode *  xml,
enum xml_private_flags  ignore_if_set 
)

Definition at line 385 of file xml.c.

◆ pcmk__xml_reset_node_flags()

bool pcmk__xml_reset_node_flags ( xmlNode *  xml,
void *  user_data 
)

Definition at line 125 of file xml.c.

◆ pcmk__xml_sanitize_id()

void pcmk__xml_sanitize_id ( char *  id)

Definition at line 654 of file xml.c.

◆ pcmk__xml_set_parent_flags()

void pcmk__xml_set_parent_flags ( xmlNode *  xml,
uint64_t  flags 
)

Definition at line 84 of file xml.c.

◆ pcmk__xml_tree_foreach()

bool pcmk__xml_tree_foreach ( xmlNode *  xml,
bool(*)(xmlNode *, void *)  fn,
void *  user_data 
)

Definition at line 47 of file xml.c.

◆ pcmk_free_xml_subtree()

void pcmk_free_xml_subtree ( xmlNode *  xml)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 1571 of file xml.c.

◆ xml_accept_changes()

void xml_accept_changes ( xmlNode *  xml)

Definition at line 445 of file xml.c.

◆ xml_calculate_changes()

void xml_calculate_changes ( xmlNode *  old_xml,
xmlNode *  new_xml 
)

Definition at line 1407 of file xml.c.

◆ xml_calculate_significant_changes()

void xml_calculate_significant_changes ( xmlNode *  old_xml,
xmlNode *  new_xml 
)

Definition at line 1399 of file xml.c.

◆ xml_document_dirty()

bool xml_document_dirty ( xmlNode *  xml)

Definition at line 368 of file xml.c.

◆ xml_track_changes()

void xml_track_changes ( xmlNode *  xml,
const char *  user,
xmlNode *  acl_source,
bool  enforce_acls 
)

Definition at line 346 of file xml.c.

◆ xml_tracking_changes()

bool xml_tracking_changes ( xmlNode *  xml)

Definition at line 361 of file xml.c.