2006-02-16 22:50:52 +00:00
|
|
|
/*
|
2007-04-06 12:28:24 +00:00
|
|
|
* xml.h: internal definitions used for XML parsing routines.
|
2006-02-16 22:50:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_XML_H__
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __VIR_XML_H__
|
2006-02-16 22:50:52 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
2006-02-16 22:50:52 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include <libxml/parser.h>
|
|
|
|
# include <libxml/tree.h>
|
|
|
|
# include <libxml/xpath.h>
|
2006-02-16 22:50:52 +00:00
|
|
|
|
2010-02-04 21:52:34 +00:00
|
|
|
int virXPathBoolean(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt);
|
2010-02-04 21:52:34 +00:00
|
|
|
char * virXPathString(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt);
|
2010-02-04 21:52:34 +00:00
|
|
|
char * virXPathStringLimit(const char *xpath,
|
|
|
|
size_t maxlen,
|
|
|
|
xmlXPathContextPtr ctxt);
|
|
|
|
int virXPathNumber(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
double *value);
|
2011-01-13 22:09:18 +00:00
|
|
|
int virXPathInt(const char *xpath,
|
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
int *value);
|
|
|
|
int virXPathUInt(const char *xpath,
|
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
unsigned int *value);
|
2010-02-04 21:52:34 +00:00
|
|
|
int virXPathLong(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
long *value);
|
2011-01-13 22:09:18 +00:00
|
|
|
int virXPathULong(const char *xpath,
|
2008-07-11 10:48:34 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
unsigned long *value);
|
2010-02-04 21:52:34 +00:00
|
|
|
int virXPathULongLong(const char *xpath,
|
2009-02-24 14:54:30 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
unsigned long long *value);
|
2011-01-13 22:09:18 +00:00
|
|
|
int virXPathLongLong(const char *xpath,
|
2010-02-02 17:49:09 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
long long *value);
|
2011-01-13 22:09:18 +00:00
|
|
|
int virXPathLongHex(const char *xpath,
|
2009-02-24 14:53:30 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
long *value);
|
2010-02-04 21:52:34 +00:00
|
|
|
int virXPathULongHex(const char *xpath,
|
2009-02-24 14:53:30 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
unsigned long *value);
|
2010-02-04 21:52:34 +00:00
|
|
|
xmlNodePtr virXPathNode(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt);
|
2010-02-04 21:52:34 +00:00
|
|
|
int virXPathNodeSet(const char *xpath,
|
2008-04-10 16:54:54 +00:00
|
|
|
xmlXPathContextPtr ctxt,
|
|
|
|
xmlNodePtr **list);
|
2008-07-11 16:23:36 +00:00
|
|
|
char * virXMLPropString(xmlNodePtr node,
|
|
|
|
const char *name);
|
|
|
|
|
2010-02-24 20:44:47 +00:00
|
|
|
xmlDocPtr virXMLParseHelper(int domcode,
|
|
|
|
const char *filename,
|
|
|
|
const char *xmlStr,
|
|
|
|
const char *url);
|
|
|
|
xmlDocPtr virXMLParseStrHelper(int domcode,
|
|
|
|
const char *xmlStr,
|
|
|
|
const char *url);
|
|
|
|
xmlDocPtr virXMLParseFileHelper(int domcode,
|
|
|
|
const char *filename);
|
|
|
|
|
|
|
|
# define virXMLParse(filename, xmlStr, url) \
|
|
|
|
virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url)
|
|
|
|
|
|
|
|
# define virXMLParseString(xmlStr, url) \
|
|
|
|
virXMLParseStrHelper(VIR_FROM_THIS, xmlStr, url)
|
|
|
|
|
|
|
|
# define virXMLParseFile(filename) \
|
|
|
|
virXMLParseFileHelper(VIR_FROM_THIS, filename)
|
|
|
|
|
2006-03-15 12:13:25 +00:00
|
|
|
#endif /* __VIR_XML_H__ */
|