1 /* Copyright (C) 2006, Index Data ApS
2 * See the file LICENSE for details.
4 * $Id: nfaxmltest1.c,v 1.4 2006-07-07 07:11:05 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 */
39 char *xmlstr="<ruleset> "
41 " <fromstring>foo</fromstring> "
42 " <tostring>bar</tostring> "
44 /* missing "</ruleset>" */
45 yaz_log(YLOG_LOG,"Parsing bad xml, expecting errors:");
46 yaz_nfa *nfa=yaz_nfa_parse_xml_memory(xmlstr);
51 int main(int argc, char **argv)
53 YAZ_CHECK_INIT(argc, argv);
65 int main(int argc, char **argv) {
66 YAZ_CHECK_INIT(argc, argv);
75 * indent-tabs-mode: nil
77 * vim: shiftwidth=4 tabstop=8 expandtab