diff --git a/TODO b/TODO
index e48e193b..468b151b 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,47 @@
- added expat to required packages in configure.ac
+ try moving iofuncs/vips.c to expat
+
+ sample XML for us to parse
+
+ $ vipsheader -f getext babe.v
+
+
+
+
+ jpegload
+ 0
+ 4294966289/169093161 (25.399999998, Rational, 1 components, 8 bytes)
+ 4294966289/169093161 (25.399999998, Rational, 1 components, 8 bytes)
+ 2 (Inch, Short, 1 components, 2 bytes)
+ Exif Version 2.1 (Exif Version 2.1, Undefined, 4 components, 4 bytes)
+ FlashPix Version 1.0 (FlashPix Version 1.0, Undefined, 4 components, 4 bytes)
+ 65535 (Internal error (unknown value 65535), Short, 1 components, 2 bytes)
+ in
+ RXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQA
+ AAABAAAATgAAAAD///wRChQoKf///BEKFCgpAAOQAAAHAAAABDAyMTCgAAAHAAAABDAxMDCgAQAD
+ AAAAAf//AAAAAAAA
+
+
+
+
+ currently works like this
+
+ read_xml is called on image load
+ - loads extension bytes into memory
+ - calls libxml to parse it to an xmlDoc
+ - saves xmlDoc to VIPS_META_XML in header
+
+ rebuild_header called next
+ - gets xmlDoc from header
+ - gets "header" node
+ calls rebuild_header_builtin() for every field node
+ - gets "meta" field
+ calls rebuild_header_meta() for every field node
+
+
- vips linecache has access there twice!
diff --git a/libvips/iofuncs/vips.c b/libvips/iofuncs/vips.c
index 749007ff..90b76225 100644
--- a/libvips/iofuncs/vips.c
+++ b/libvips/iofuncs/vips.c
@@ -78,6 +78,7 @@
#include
#endif /*HAVE_IO_H*/
#include
+#include
#include
#ifdef OS_WIN32