I'm trying to output a xml file without xml head like I tried:
Type t = obj.GetType();
XmlSerializer xs=new XmlSerializer(t);
XmlWriter xw = XmlWriter.Create(@"company.xml",
new XmlWriterSettings() { OmitXmlDeclaration = true, Indent = true });
xs.Serialize(xw,obj);
xw.Close();
But it's still outputing in the xml file. I don't want string tricks. Any ideas?