Question: how to create xdocument in c#?
Answer: List<string> lst; XmlDocument XD = new XmlDocument(); XmlElement root = XD. CreateElement("file"); XmlElement nm = XD. CreateElement("name"); nm. SetAttribute("filename", "Sample"); root.