I'm creating a schema in code and I want to save it to a file. But in the file the schema is not formatted but is display as one big line.
var nsmgr = new XmlNamespaceManager(new NameTable());
nsmgr.AddNamespace("xs", "http://www.w3.org/2001/XMLSchema");
nsmgr.AddNamespace("name", "someNamespace");
var xtw = new XmlTextWriter("somepath", Encoding.UTF-8);
schema.Write(xtw, nsmgr);
Is there a component that formats the schema?