I think the above question intention is about to convert XML through XSLT like initially he has some XML and he want to do some modifications and after that he want generate resulted XML with XLST.
try to use below function to process the inputXML through XSLT to get the output XML.
private GenerateXML(string xmlInPath, string xsltPath, string xmlOutPath)
XsltArgumentList xslArg = new XsltArgumentList();
addressQuery addressQueryObj = new addressQuery();
XslCompiledTransform xslTrans = new XslCompiledTransform();
XPathDocument xPathDoc = new XPathDocument(xmlInPath);
XmlTextWriter writer = new XmlTextWriter(xmlOutPath, null);
xslTrans.Transform(xPathDoc, xslArg, writer);
catch (Exception ex)