+ 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"));
+ }
+}