[Solved] How to convert List to xml document in c#

You may use XElement or XDocument and LINQ. Providing a sample of what the XML should look like we could provide more info. For instance: BugWSResponseList1.Add(“<Bug><family>TEST22</family><product>Dr.Watson</product><version>Xpress API</version><productarea>1</productarea><subarea></subarea><qe>sdawar</qe><duplicateId></duplicateId></Bug>”); BugWSResponseList1.Add(“<Bug><family>ESG</family><product>Dr.Watson</product><version>Xpress API</version><productarea>1</productarea><subarea></subarea><qe>sdawar</qe><duplicateId></duplicateId></Bug>”); XElement xe = new XElement ( “Bugs”, BugWSResponseList1 .Select ( x=> XElement.Parse(x) ) ); So after i have loaded the list with the two pieces of … Read more