blob: 266a73404a152b0c008d87d6f9a107f8b3fb735f (
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
38
39
40
41
42
43
44
|
#include "config.h"
#include <stdio.h>
#include <string.h>
/**
* ttxml - tiny XML library for parsing (trusted!) XML documents.
*
* This parses an XML file into a convenient data structure.
*
* Example:
* #include <ccan/ttxml/ttxml.h>
* #include <stdio.h>
*
* int main(int argc, char *argv[])
* {
* XmlNode *xml, *tmp;
*
* xml = xml_load("./test/test.xml2");
* if(!xml)return 1;
*
* tmp = xml_find(xml, "childnode");
*
* printf("%s: %s\n", xml->name, xml_attr(tmp, "attribute"));
*
* xml_free(xml);
*
* return 0;
* }
*
* License: GPL
* Author: Daniel Burke <dan.p.burke@gmail.com>
*/
int main(int argc, char *argv[])
{
/* Expect exactly one argument */
if (argc != 2)
return 1;
if (strcmp(argv[1], "depends") == 0) {
return 0;
}
return 1;
}
|