diff options
Diffstat (limited to 'src/KM_xml.cpp')
| -rw-r--r-- | src/KM_xml.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/KM_xml.cpp b/src/KM_xml.cpp index 794e2e7..605ea11 100644 --- a/src/KM_xml.cpp +++ b/src/KM_xml.cpp @@ -138,10 +138,12 @@ Kumu::XMLElement::RenderElement(std::string& outbuf, ui32_t depth) outbuf += "\""; } + outbuf += ">"; + // body contents and children if ( ! m_ChildList.empty() ) { - outbuf += ">\n"; + outbuf += "\n"; // render body if ( m_Body.length() > 0 ) @@ -151,22 +153,15 @@ Kumu::XMLElement::RenderElement(std::string& outbuf, ui32_t depth) (*i)->RenderElement(outbuf, depth + 1); add_spacer(outbuf, depth); - outbuf += "</"; - outbuf += m_Name; - outbuf += ">\n"; } else if ( m_Body.length() > 0 ) { - outbuf += ">"; outbuf += m_Body; - outbuf += "</"; - outbuf += m_Name; - outbuf += ">\n"; - } - else - { - outbuf += " />\n"; } + + outbuf += "</"; + outbuf += m_Name; + outbuf += ">\n"; } |
