Released 1.8.6, Daniel.
diff --git a/tree.c b/tree.c
index db2b5d2..466c11f 100644
--- a/tree.c
+++ b/tree.c
@@ -38,6 +38,7 @@
static int xmlCompressMode = 0;
static int xmlCheckDTD = 1;
+int xmlSaveNoEmptyTags = 0;
#define UPDATE_LAST_CHILD(n) if ((n) != NULL) { \
xmlNodePtr ulccur = (n)->childs; \
@@ -4299,7 +4300,8 @@
if (cur->properties != NULL)
xmlAttrListDump(buf, doc, cur->properties);
- if ((cur->content == NULL) && (cur->childs == NULL)) {
+ if ((cur->content == NULL) && (cur->childs == NULL) &&
+ (!xmlSaveNoEmptyTags)) {
xmlBufferWriteChar(buf, "/>");
return;
}