Example #1
0
	void Node::Write (std::ostream & out, unsigned indent) const
	{
		WriteOpeningTag (out, indent);
		if (!_closed)
		{
			for (ConstChildIter it = FirstChild (); it != LastChild (); ++it)
			{
				XML::Node * child = *it;
				if (child->GetName ().empty ()) // text
				{
					out << Indentation (indent) << child->GetAttribValue ("Text") << std::endl;
				}
				else
				{
					child->Write (out, indent + 2);
				}
			}
		}
		WriteClosingTag (out, indent);
	}