swapping elements with LINQ

mankan

New Member
I have an xml document of the following format:\[code\]<body> <par id = "1"> <prop type="Content">One</prop> <child xml:id="1"> <span>This is span 1</span> </child> <child xml:id="2"> <span>This is span 2</span> </child> </par></body>\[/code\]I'm not very familiar with using LINQ, and I'd like to use it to swap the elements of the above code. (I.E., I'd like to move \[code\]<span>This is span 2</span>\[/code\]into the \[code\]<child xml:id="1"></child>\[/code\]element tree, and vica versa)I'm running through the examples at http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b, but I'd really like an additional push in the right direction (I'm honestly having trouble figuring out where to start!).Thank you!
 
Back
Top