Editing xml file ;swapping nodes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KUTTAN
    New Member
    • Mar 2007
    • 33

    Editing xml file ;swapping nodes

    I have an xml file as follows

    <?xml version="1.0" encoding="utf-8" ?>

    <Nodes>

    <Nodes1>

    <siteMapNode title="Product Cataloge">

    <siteMapNode title="ManagePr oducts" url="~/Admin/Products.aspx" />

    <siteMapNode title="ManageCa tegory" url="~/Admin/Category.aspx"/>

    </siteMapNode>

    </Nodes1>

    <Nodes2>

    <siteMapNode title="Orders">

    <siteMapNode title="RFQ" url="~/Admin/ManageQut.aspx" />

    <siteMapNode title="Orders" url="~/Admin/ManageOrder.asp x" />

    </siteMapNode>

    </Nodes2>

    </Nodes>



    See the above shows one of my xml file in my application

    I am using them to populate data in a tree(no problem)



    Now in this xml file for example

    ManageProducts is the first item under Product Cataloge

    But I want to change it in a server side event

    I want to make

    ManageCategory as the first item under Product Cataloge and

    ManageProducts as the second item under Product Cataloge



    Ie I want two swap nodes in a xml file

    What is the best way to do this
Working...