void TiXmlElement::StreamOut( TIXML_OSTREAM * stream ) const { (*stream) << TEXT("<") << value; TiXmlAttribute* attrib; for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() ) { (*stream) << TEXT(" "); attrib->StreamOut( stream ); } // If this node has children, give it a closing tag. Else // make it an empty tag. TiXmlNode* node; if ( firstChild ) { (*stream) << TEXT(">"); for ( node = firstChild; node; node=node->NextSibling() ) { node->StreamOut( stream ); } (*stream) << TEXT("</") << value << TEXT(">"); } else { (*stream) << TEXT(" />"); } }