+ case wxXML_ELEMENT_NODE:
+ OutputString(stream, wxT("<"), NULL, NULL);
+ OutputString(stream, node->GetName(), NULL, NULL);
+
+ prop = node->GetProperties();
+ while (prop)
+ {
+ OutputString(stream, wxT(" ") + prop->GetName() +
+ wxT("=\"") + prop->GetValue() + wxT("\""),
+ NULL, NULL);
+ // FIXME - what if prop contains '"'?
+ prop = prop->GetNext();
+ }
+
+ if (node->GetChildren())
+ {
+ OutputString(stream, wxT(">"), NULL, NULL);
+ prev = NULL;
+ n = node->GetChildren();
+ while (n)
+ {
+ if (n && n->GetType() != wxXML_TEXT_NODE)
+ OutputIndentation(stream, indent + 1);
+ OutputNode(stream, n, indent + 1, convMem, convFile);
+ prev = n;
+ n = n->GetNext();
+ }
+ if (prev && prev->GetType() != wxXML_TEXT_NODE)
+ OutputIndentation(stream, indent);
+ OutputString(stream, wxT("</"), NULL, NULL);
+ OutputString(stream, node->GetName(), NULL, NULL);
+ OutputString(stream, wxT(">"), NULL, NULL);
+ }
+ else
+ OutputString(stream, wxT("/>"), NULL, NULL);
+ break;
+
+ case wxXML_COMMENT_NODE:
+ OutputString(stream, wxT("<!--"), NULL, NULL);
+ OutputString(stream, node->GetContent(), convMem, convFile);
+ OutputString(stream, wxT("-->"), NULL, NULL);
+ break;
+
+ default:
+ wxFAIL_MSG(wxT("unsupported node type"));
+ }
+}
+
+bool wxXmlDocument::Save(wxOutputStream& stream) const