I've tried to find a solution for my problem, but my knowledge in this area (Linq, XML) is rather limited. :( 've found a simular construction, but I need a litte bit more complex way of sorting.
Consider the Following XML document:
<Envelope>
<Body>
<Table>
<Trans>
<B>1</B>
<A>3</A>
<C>5</C>
</Trans>
<Trans>
<D>1</D>
<A>6</A>
<C>3</C>
</Trans>
<Trans>
<A>1</A>
<C>3</C>
<B>5</B>
</Trans>
</Table>
</Body>
<Envelope>
Is there any way I can sort the elements inside <Trans> using C#/Linq, or do I have to break up all <Trans> elements and sort them one by one?
Update I have a file and this is what I'm tring to accomplish. ;)
<Envelope>
<Body>
<Table>
<Trans>
<A>3</A>
<B>1</B>
<C>5</C>
</Trans>
<Trans>
<A>6</A>
<C>3</C>
<D>1</D>
</Trans>
<Trans>
<A>1</A>
<B>5</B>
<C>3</C>
</Trans>
</Table>
</Body>
<Envelope>
<D>1</D><A>6</A><C>3</C>he wants to sort it into<A>6</A><C>3</C><D>1</D>in alphabetic order regardless of the integer values.