1 /* Copyright (C) 2006, Index Data ApS
2 * See the file LICENSE for details.
4 * $Id: nfaxmltest1.c,v 1.5 2006-07-07 07:14:30 adam Exp $
14 #include <yaz/nfaxml.h>
17 #include <libxml/parser.h>
20 /** \brief Test parsing of a minimal, valid xml string */
22 char *xmlstr="<ruleset> "
24 " <fromstring>foo</fromstring> "
25 " <tostring>bar</tostring> "
28 yaz_nfa *nfa=yaz_nfa_parse_xml_memory(xmlstr);
37 /** \brief Test parsing of a minimal, invalid xml string */
40 char *xmlstr="<ruleset> "
42 " <fromstring>foo</fromstring> "
43 " <tostring>bar</tostring> "
45 /* missing "</ruleset>" */
46 yaz_log(YLOG_LOG,"Parsing bad xml, expecting errors:");
47 nfa = yaz_nfa_parse_xml_memory(xmlstr);
52 int main(int argc, char **argv)
54 YAZ_CHECK_INIT(argc, argv);
66 int main(int argc, char **argv) {
67 YAZ_CHECK_INIT(argc, argv);
76 * indent-tabs-mode: nil
78 * vim: shiftwidth=4 tabstop=8 expandtab