]> git.ozlabs.org Git - ccan/blobdiff - ccan/ttxml/_info
opt: add allocator setting.
[ccan] / ccan / ttxml / _info
index 9bf0ddbcdebe9adb688670ec343145a591912cd9..3ec45207bff73e09531ab160284e18bc9d7dcbe6 100644 (file)
@@ -6,6 +6,26 @@
  *
  * This parses an XML file into a convenient data structure.
  *
+ * Example:
+ * #include <ccan/ttxml/ttxml.h>
+ * #include <stdio.h>
+ *
+ * int main(int argc, char *argv[])
+ * {
+ *     XmlNode *xml, *tmp;
+ *
+ *     xml = xml_load("./test/test.xml2");
+ *     if(!xml)return 1;
+ *
+ *     tmp = xml_find(xml, "childnode");
+ *
+ *     printf("%s: %s\n", xml->name, xml_attr(tmp, "attribute"));
+ *
+ *     xml_free(xml);
+ *
+ *     return 0;
+ * }
+ *
  * License: GPL
  * Author: Daniel Burke <dan.p.burke@gmail.com>
  */