--- a/minixml.c
+++ b/minixml.c
@@ -30,6 +30,7 @@
 POSSIBILITY OF SUCH DAMAGE.
 */
 #include "minixml.h"
+#include "upnpreplyparse.h"
 
 /* parseatt : used to parse the argument list
  * return 0 (false) in case of success and -1 (true) if the end
@@ -152,8 +153,11 @@
 						if (p->xml >= p->xmlend)
 							return;
 					}
-					if(i>0 && p->datafunc)
-						p->datafunc(p->data, data, i);
+					if (p->datafunc)
+					{
+						if (i > 0 || (p->flags & XML_STORE_EMPTY_FL))
+							p->datafunc(p->data, data, i);
+					}
 				}
 			}
 			else if(*p->xml == '/')