summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-24 09:13:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-24 09:13:21 +0200
commitb0396809c19f436e051430d5e81d59a725611195 (patch)
tree29e374c30aef241b4edfa604a131b4c33ecedc3f /README.md
parentd19d20fbd638c3edb0e2dea1589455546a309382 (diff)
Convert to build2-based build
Also add symbol exporting, missing const in a few places in the API, as well as a basic test.
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3a0d8c4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+# libgenx - XML serializer C library
+
+A portable, dependency-free, MIT-licensed XML push-serializer library for C.
+
+```
+#include <libgenx/genx.h>
+
+int main()
+{
+ genxWriter w = genxNew(NULL, NULL, stdout);
+ genxStartDocSender(w, &stdioSender);
+ genxStartElementLiteral(w, (utf8)"http://example.org/1", (utf8)"greeting");
+ genxAddAttributeLiteral(w, (utf8)"http://example.com/2", (utf8)"type", (utf8)"well-formed");
+ genxAddText(w, (utf8)"Hello world!");
+ genxEndElement(w);
+ genxEndDocument(w);
+ genxDispose(w);
+}
+```
+
+This is a cleaned up, fixed, and enhanced version of [Tim Bray's
+Genx](https://www.tbray.org/ongoing/genx/docs/Guide.html). Note that support
+for `genxStartDocFile()` (which depends on `<stdio.h>`) has been removed.
+See the `basics` test for an example of how to achieve the same yourself.