summaryrefslogtreecommitdiffstats
path: root/server/parser/xmlparser.h
blob: 096f42517425e9a9dc5f9964575400a514ce06f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright (C) 2009 Red Hat Inc.
 *
 * David Sommerseth <davids@redhat.com>
 *
 * Parses summary.xml reports from rteval into a standardised XML format
 * which is useful when putting data into a database.
 *
 * This application is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; version 2.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */

#ifndef _XMLPARSER_H
#define _XMLPARSER_H

#define XSLTFILE "/usr/share/rteval/xmlparser.xsl"

typedef struct {
        const char *table;
        unsigned int syskey;
        const char *report_filename;
        unsigned int rterid;
} parseParams;

xmlDoc *parseToSQLdata(xsltStylesheet *xslt, xmlDoc *indata_d, parseParams *params);
char *sqldataExtractContent(xmlNode *sql_n);
int sqldataGetFid(xmlNode *sqld, const char *fname);
char *sqldataGetValue(xmlDoc *sqld, const char *fname, int recid);
xmlDoc *sqldataGetHostInfo(xsltStylesheet *xslt, xmlDoc *summaryxml,
			   int syskey, char **hostname, char **ipaddr);
#endif