_info 780 B

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