I'm searching for a good way to generate an XML by a specific format. After checking several guids and SO questions(which I'm to newbie to understand most of them) I've encountered the XElement feature for buildig a "tree" .
This could work, according to the link, you can nest an XElement over and over and create the desired hierarchy. My problem is that I need to load records from my database.
So my question is - Is there a way to create an XElement which will be the ROOT, and then for each record from my table, create another XElement and populate all the necessary details, and then attach it to the original root? Or am I going in the wrong direction and there's an easier way around it.