_info 761 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <string.h>
  2. #include "config.h"
  3. /**
  4. * ttxml - tiny XML library for parsing (trusted!) XML documents.
  5. *
  6. * This parses an XML file into a convenient data structure.
  7. *
  8. * Example:
  9. * #include <ccan/ttxml/ttxml.h>
  10. * #include <stdio.h>
  11. *
  12. * int main(int argc, char *argv[])
  13. * {
  14. * XmlNode *xml, *tmp;
  15. *
  16. * xml = xml_load("./test/test.xml2");
  17. * if(!xml)return 1;
  18. *
  19. * tmp = xml_find(xml, "childnode");
  20. *
  21. * printf("%s: %s\n", xml->name, xml_attr(tmp, "attribute"));
  22. *
  23. * xml_free(xml);
  24. *
  25. * return 0;
  26. * }
  27. *
  28. * License: GPL
  29. * Author: Daniel Burke <dan.p.burke@gmail.com>
  30. */
  31. int main(int argc, char *argv[])
  32. {
  33. /* Expect exactly one argument */
  34. if (argc != 2)
  35. return 1;
  36. if (strcmp(argv[1], "depends") == 0) {
  37. return 0;
  38. }
  39. return 1;
  40. }