public void UnionTest(string s) { var set = new S.XmlSchemaSet(); var settings = new XML.XmlReaderSettings() { DtdProcessing = XML.DtdProcessing.Parse, }; var reader = new System.IO.StringReader(s); var r = XML.XmlReader.Create(reader, settings); set.Add(null, r); G.ThisAssembly = A.GetExecutingAssembly(); G.GenerateXObjects(set, "temp.cs", null, null, true, false); }