C#中实体集合和实体转换成相应的string.XDocument.XElement public class SimpleXmlConverter { public static string ToXml<T>(IList<T> entities, string rootName = "") where T : new() { ) { return string.Empty; } StringBuilder builder = new StringBuilder…
原文:C#将XML转换成JSON转换XML using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using Newtonsoft.Json; namespace JSonConverter { class Program { static void Main(string[] args) { string xml = "<Test>…