Hello
I have a navigation file that is in xml format, and i am manipulating it using simpleXml. I would like to be able to adjust the order of the items in the file, but am having some trouble gettings to grips with how to achieve this.
Assuming the following navigation snippet:
<about>
<label>About Our Company!</label>
<uri>/about</uri>
<pages>
<about-us>
<label>About Us</label>
<uri>/about</uri>
<order>2</order>
</about-us>
<contact>
<label>Contact Us</label>
<uri>/about/contact/</uri>
<order>3</order>
</contact>
<new-section>
<label>new-section</label>
<uri>/about/new-section</uri>
<order>1</order>
</new-section>
</pages>
</about>
Now i am trying to sort the children of the “About” node, so that it’s children are ordered ascending, so 1-2-3 (new-section, about-us, contact). Any pointers on how i could achieve this?