xmlutil.c File Reference

XML helper functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rfb/rfb.h>
#include <libxml/xmlreader.h>
#include "xmlutil.h"

Include dependency graph for xmlutil.c:


Functions

void xmlutil_error_func (void *arg, const char *msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator)
int xmlutil_parse_color (char *color, unsigned long *parsed)
int xmlutil_get_current_line (xmlTextReaderPtr reader)
int xmlutil_read_attribute (xmlTextReaderPtr reader, int line, const xmlChar **name, const xmlChar **value)
int xmlutil_check_dir_path (char **dir_path)

Detailed Description


Function Documentation

void xmlutil_error_func ( void *  arg,
const char *  msg,
xmlParserSeverities  severity,
xmlTextReaderLocatorPtr  locator 
)

Parser error callback function.

Generates log messages if a parser error occurs.

Parameters:
arg user argument
msg error message
severity severity info
locator location information

int xmlutil_parse_color ( char *  color,
unsigned long *  parsed 
)

Parses HTML color encoding.

Parameters:
color the color string
parsed the parsed color in 'R, B, G, Alpha' format (return value)
Returns:
0 on success or -1 if an error occured.

int xmlutil_get_current_line ( xmlTextReaderPtr  reader  ) 

Provides the current line number in a XML document.

Parameters:
reader the XML reader
Returns:
the current line number or -1 if an error occured

int xmlutil_read_attribute ( xmlTextReaderPtr  reader,
int  line,
const xmlChar **  name,
const xmlChar **  value 
)

Reads the attribute name and value of a XML node.

Parameters:
reader the XML reader
line current line in XML document
name attribute name (return value)
value attribute value (return value)
Returns:
0 on success or -1 if an error occured

int xmlutil_check_dir_path ( char **  dir_path  ) 

Adds a '/' character to a directory path, if necessary.

Parameters:
dir_path directory path
Returns:
0 on success or -1 if an error occured


Generated on Mon Mar 29 01:39:35 2010 for Veronica by  doxygen 1.5.8