-// When wxXml is loaded dynamically after the application is already running
-// then the built-in module system won't pick this one up. Add it manually.
-void wxXmlInitXmlModule()
-{
- wxModule* module = new wxXmlModule;
- module->Init();
- wxModule::RegisterModule(module);
+ 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"));
+ }