Anyone up for an XML challenge?
I need a method to move a node up the XML hierarchy(to the same level of its parent), so if I had an XMList that looks like this:
<node label="a">
<node label="b">
<node label="c1">
<node label="d1"/>
<node label="d2"/>
</node>
<node label="c2"/></node>
</node>
and I want to move the "d1" node up, the XMLList would end up looking like this: (with the node moved to the same level of its parent)
<node label="a">
<node label="b">
<node label="c1">
<node label="d1"/>
</node>
<node label="d2"/>
<node label="c2"/>
</node>
</node>
Call the method again with the same node, and the XMLList should look like this:
<node label="a">
<node label="b">
<node label="c1">
<node label="d1"/>
</node>
<node label="c2"/>
</node>
<node label="d2"/>
</node>
etc! I could probably work this out myself, but thought someone might have encountered this scenario and achieved this already...