Wondering if there is a fast way, maybe with linq?, to convert a Dictionary into a XML document. And a way to convert the xml back to a di
Dictionary
Did something like this for an IDictionary
XElement root = new XElement("root"); foreach (var pair in _dict) { XElement cElement = new XElement("parent", pair.Value); cElement.SetAttributeValue("id", pair.Key); el.Add(cElement); }
That produced the following XML:
0 1 2 3