Does anyone know a tool that will generate LINQ to XML code from a real XML document or fragment? This is reverse engineering a common XML generation script.
For example, I want to provide an XML fragment as input, such as
<root> <thing>value</thing> </root>
and generate the equivalent C # LINQ to XML code snippet in this way
var x = new XElement("root", new XElement("thing", new XText("value")); );
Although I'm looking for a quick one, I'm sure some enterprising people will tell me to quit my own and provide some awesome reference code.
source share