From b6858640ec6ca17dc746863d1e92cb2452253d7d Mon Sep 17 00:00:00 2001 From: bpc2003 Date: Mon, 5 May 2025 16:51:27 -0400 Subject: Get started on XML decoder --- src/include/xml/xml.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/include/xml/xml.h') 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 -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); -- cgit v1.2.3