summaryrefslogtreecommitdiff
path: root/apps/samxml.c
blob: c42d8036c085a7ebd933cdbfc5edf8a1802f72b1 (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
#include "fitz.h"
#include "samus.h"

int main(int argc, char **argv)
{
	fz_error *error;
	fz_file *file;
	sa_xmlparser *parser;
	sa_xmlitem *item;

	error = fz_openfile(&file, argv[1], FZ_READ);
	if (error)
		fz_abort(error);

	error = sa_openxml(&parser, file, 0);
	if (error)
		fz_abort(error);

	item = sa_xmlnext(parser);
	if (item)
		sa_debugxml(item, 0);

	sa_closexml(parser);
	fz_closefile(file);

	return 0;
}