No doubt its been asked before, but I haven't been able to find a solution to this problem anywhere, so here goes.
I have an XML Schema saved in a file, lets say "schema.xsd". I am generating the XML document that this schema will validate dynamically from within Visual Basic 6 with MXSML4. Now, I need to put a reference to the schema onto the root element of the XML I am generating. eg:
--- rest of XML document ---
This needs to be done within the DOM as I generate the XML. How do I do this? MSDN suggests using XMLSchemaCache but that doesn't work, and I can't find any other way.