-static int test_find(void)
-{
- char *ctmp;
- XmlNode *xtmp, *xml = xml_load("./test/test.xml2");
- if(!xml)return 0;
-
- xp(xml, 0, 20);
-
-
- xtmp = xml_find(xml, "one");
- if(!xtmp)
- {
- printf("Failed to find node\n");
- return 0;
- }
- printf("node is...\n");
- xp(xtmp, 0, 20);
-
- ctmp = xml_attr(xtmp, "barfoo");
- if(!ctmp)
- {
- printf("Failed to find attribute\n");
- return 0;
- }
-
- return 1;
-}
-