What's the best way to move "a child up" in a C# XmlDocument?
- by Mike
Hi everyone,
Given an xml structure like this:
<garage>
<car>Firebird</car>
<car>Altima</car>
<car>Prius</car>
</garage>
I want to "move" the Prius node "one level up" so it appears above the Altima node. Here's the final structure I want:
<garage>
<car>Firebird</car>
<car>Prius</car>
<car>Altima</car>
</garage>
So given the C# code:
XmlNode priusNode = GetReferenceToPriusNode()
What's the best way to cause the priusNode to "move up" one place in the garage's child list?
Thanks!
-Mike