Esempio n. 1
0
XmlElement* XmlDocument::root() const
{
	for (XmlNode* child = firstChild(); child; child = child->next())
	{
		if (child->toElement())
			return reinterpret_cast<XmlElement*>(child);
	}
	return 0;
}
Esempio n. 2
0
bool XmlDocument::write(Stream& stream, uint depth) const
{
	for (XmlNode* child = firstChild(); child; child = child->next())
	{
		child->write(stream,depth);
		stream << endl;
	}
	return true;
}