summaryrefslogtreecommitdiff
path: root/src/include/xml/xml.h
diff options
context:
space:
mode:
authorbpc2003 <wpesfriendnva@gmail.com>2025-05-01 12:23:37 -0400
committerbpc2003 <wpesfriendnva@gmail.com>2025-05-01 12:23:37 -0400
commit0102df793c02c94eb48a16370610e0e28a5c3361 (patch)
tree09d3f96f8b24b8284504803a3b9d2961810cc10c /src/include/xml/xml.h
parent4ea8fe896cc333f5e7addd56e23db5668f4599b3 (diff)
Get started on xml encoding
Diffstat (limited to 'src/include/xml/xml.h')
-rw-r--r--src/include/xml/xml.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/include/xml/xml.h b/src/include/xml/xml.h
new file mode 100644
index 0000000..c20f9d9
--- /dev/null
+++ b/src/include/xml/xml.h
@@ -0,0 +1,24 @@
+#ifndef XML_H
+#define XML_H
+
+#include <stdio.h>
+
+struct map {
+ char *tag;
+ void *payload;
+ size_t size;
+ size_t n;
+ struct map *attrs;
+ size_t n_attrs;
+};
+
+typedef struct map map_t;
+
+/* decode: decodes the provided xml statement into a map_t */
+map_t *decode(char *xml_str, int *len);
+
+/* encode: encodes the provided map_t into a xml statement */
+char *encode(map_t *map, int len);
+
+
+#endif