summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 7b96d34..dc3e7be 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4078,12 +4078,23 @@ PUGI__NS_BEGIN
{
if (!node->first_child)
{
- if ((flags & format_raw) == 0)
- writer.write(' ');
+ if (flags & format_no_empty_element_tags)
+ {
+ writer.write('>', '<', '/');
+ writer.write_string(name);
+ writer.write('>');
+
+ return false;
+ }
+ else
+ {
+ if ((flags & format_raw) == 0)
+ writer.write(' ');
- writer.write('/', '>');
+ writer.write('/', '>');
- return false;
+ return false;
+ }
}
else
{