diff options
author | bpc2003 <wpesfriendnva@gmail.com> | 2025-05-05 16:51:27 -0400 |
---|---|---|
committer | bpc2003 <wpesfriendnva@gmail.com> | 2025-05-05 16:51:27 -0400 |
commit | b6858640ec6ca17dc746863d1e92cb2452253d7d (patch) | |
tree | 28eed53fbdbdaf0b946175905ffadaaad0760949 /src/include/xml/xml.h | |
parent | 0102df793c02c94eb48a16370610e0e28a5c3361 (diff) |
Get started on XML decoder
Diffstat (limited to 'src/include/xml/xml.h')
-rw-r--r-- | src/include/xml/xml.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/xml/xml.h b/src/include/xml/xml.h index c20f9d9..5668d12 100644 --- a/src/include/xml/xml.h +++ b/src/include/xml/xml.h @@ -3,16 +3,21 @@ #include <stdio.h> -struct map { + +typedef struct { + char *id; + char *value; +} attr_t; + +typedef struct { char *tag; void *payload; size_t size; size_t n; - struct map *attrs; - size_t n_attrs; -}; + attr_t *attrs; + int n_attrs; +} map_t; -typedef struct map map_t; /* decode: decodes the provided xml statement into a map_t */ map_t *decode(char *xml_str, int *len); |