pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Macros | Functions
xml_io.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <bzlib.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlIO.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/xml_io.h>
#include "crmcommon_private.h"
#include <crm/common/xml_io_compat.h>
Include dependency graph for xml_io.c:

Go to the source code of this file.

Macros

#define PCMK__XML_PARSE_OPTS_WITHOUT_RECOVER   (XML_PARSE_NOBLANKS)
 
#define PCMK__XML_PARSE_OPTS_WITH_RECOVER
 
#define parse_xml_recover(result, fn, ...)
 

Functions

xmlNode * pcmk__xml_read (const char *filename)
 
xmlNode * pcmk__xml_parse (const char *input)
 
void pcmk__xml_string (const xmlNode *data, uint32_t options, GString *buffer, int depth)
 
int pcmk__xml_write_fd (const xmlNode *xml, const char *filename, int fd, bool compress, unsigned int *nbytes)
 
int pcmk__xml_write_file (const xmlNode *xml, const char *filename, bool compress, unsigned int *nbytes)
 
int pcmk__xml2fd (int fd, xmlNode *cur)
 
void save_xml_to_file (const xmlNode *xml, const char *desc, const char *filename)
 
xmlNode * filename2xml (const char *filename)
 
xmlNode * stdin2xml (void)
 
xmlNode * string2xml (const char *input)
 
char * dump_xml_formatted (const xmlNode *xml)
 
char * dump_xml_formatted_with_text (const xmlNode *xml)
 
char * dump_xml_unformatted (const xmlNode *xml)
 
int write_xml_fd (const xmlNode *xml, const char *filename, int fd, gboolean compress)
 
int write_xml_file (const xmlNode *xml, const char *filename, gboolean compress)
 

Macro Definition Documentation

◆ parse_xml_recover

#define parse_xml_recover (   result,
  fn,
  ... 
)
Value:
do { \
if (*result == NULL) { \
\
if (*result != NULL) { \
crm_warn("Successfully recovered from XML errors " \
"(note: a future release will treat this as a " \
"fatal failure)"); \
} \
} \
} while (0);
#define PCMK__XML_PARSE_OPTS_WITH_RECOVER
Definition: xml_io.c:33
pcmk__action_result_t result
Definition: pcmk_fence.c:35
#define PCMK__XML_PARSE_OPTS_WITHOUT_RECOVER
Definition: xml_io.c:32

Definition at line 141 of file xml_io.c.

◆ PCMK__XML_PARSE_OPTS_WITH_RECOVER

#define PCMK__XML_PARSE_OPTS_WITH_RECOVER
Value:
(XML_PARSE_NOBLANKS \
|XML_PARSE_RECOVER)

Definition at line 33 of file xml_io.c.

◆ PCMK__XML_PARSE_OPTS_WITHOUT_RECOVER

#define PCMK__XML_PARSE_OPTS_WITHOUT_RECOVER   (XML_PARSE_NOBLANKS)

Definition at line 32 of file xml_io.c.

Function Documentation

◆ dump_xml_formatted()

char* dump_xml_formatted ( const xmlNode *  xml)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 776 of file xml_io.c.

◆ dump_xml_formatted_with_text()

char* dump_xml_formatted_with_text ( const xmlNode *  xml)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 789 of file xml_io.c.

◆ dump_xml_unformatted()

char* dump_xml_unformatted ( const xmlNode *  xml)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 802 of file xml_io.c.

◆ filename2xml()

xmlNode* filename2xml ( const char *  filename)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 758 of file xml_io.c.

◆ pcmk__xml2fd()

int pcmk__xml2fd ( int  fd,
xmlNode *  cur 
)

Definition at line 713 of file xml_io.c.

◆ pcmk__xml_parse()

xmlNode* pcmk__xml_parse ( const char *  input)

Definition at line 244 of file xml_io.c.

◆ pcmk__xml_read()

xmlNode* pcmk__xml_read ( const char *  filename)

Definition at line 166 of file xml_io.c.

◆ pcmk__xml_string()

void pcmk__xml_string ( const xmlNode *  data,
uint32_t  options,
GString *  buffer,
int  depth 
)

Definition at line 488 of file xml_io.c.

◆ pcmk__xml_write_fd()

int pcmk__xml_write_fd ( const xmlNode *  xml,
const char *  filename,
int  fd,
bool  compress,
unsigned int *  nbytes 
)

Definition at line 660 of file xml_io.c.

◆ pcmk__xml_write_file()

int pcmk__xml_write_file ( const xmlNode *  xml,
const char *  filename,
bool  compress,
unsigned int *  nbytes 
)

Definition at line 688 of file xml_io.c.

◆ save_xml_to_file()

void save_xml_to_file ( const xmlNode *  xml,
const char *  desc,
const char *  filename 
)

Definition at line 734 of file xml_io.c.

◆ stdin2xml()

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

Definition at line 764 of file xml_io.c.

◆ string2xml()

xmlNode* string2xml ( const char *  input)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 770 of file xml_io.c.

◆ write_xml_fd()

int write_xml_fd ( const xmlNode *  xml,
const char *  filename,
int  fd,
gboolean  compress 
)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 815 of file xml_io.c.

◆ write_xml_file()

int write_xml_file ( const xmlNode *  xml,
const char *  filename,
gboolean  compress 
)
Deprecated:
Do not use Pacemaker for general-purpose XML manipulation

Definition at line 828 of file xml_io.c.