28 m_insideOpeningTag(false),
30 m_levelIndent(levelIndent)
33 m_outputStream << m_lineIndentString;
35 m_lineIndentString.insert(0, 1,
'\n');
42 if (m_insideOpeningTag) m_outputStream <<
TAG_END;
45 if (newLine) m_outputStream << m_lineIndentString;
49 m_elementStack.push(name);
51 m_insideOpeningTag =
true;
54 m_lineIndentString.append(m_levelIndent,
INDENT_CHAR);
61 if (0 >= m_elementStack.size())
throw ;
64 m_lineIndentString.resize(m_lineIndentString.size() - m_levelIndent);
72 if (newLine) m_outputStream << m_lineIndentString;
80 m_insideOpeningTag =
false;
88 if (!m_insideOpeningTag) throw ;
97 if (!m_insideOpeningTag) throw ;
105 if (m_insideOpeningTag) m_outputStream <<
TAG_END;
106 m_insideOpeningTag =
false;
109 if (newLine) m_outputStream << m_lineIndentString;
112 m_outputStream << data;
119 if (m_insideOpeningTag) m_outputStream <<
TAG_END;
120 m_insideOpeningTag =
false;
123 if (newLine) m_outputStream << m_lineIndentString;
132 return m_elementStack.size();
138 return m_elementStack.top();