How to sorting XmlNodeList when hirarchy is different in C# : Can you please tell me how to sorting code tag value as per given attribute value.
Please reply me as soon as possible 

I have also asked same question in Microsoft forum

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Input:

    <category>
            <code type="pub">e00001</code>
            <title>cat1</title>
            <ranking>0</ranking>
        </category>
        <category>
            <span>
               <code type="pub">e00004</code>
            </span>
            <title>cat2</title>
            <ranking>1</ranking>
        </category>
        <category>
            <code type="pub">e00003</code>
            <title>awe</title>
            <ranking>10</ranking>
        </category>
        <category>
            <span>
               <code type="pub">e00002</code>
            </span>
            <title>zrt</title>
            <ranking>6</ranking>
        </category>

Output:

    <category>
            <code type="pub">e00001</code>
            <title>cat1</title>
            <ranking>0</ranking>
        </category>
        <category>
            <span>
               <code type="pub">e00002</code>
            </span>
            <title>zrt</title>
            <ranking>6</ranking>
        </category>
        <category>
            <code type="pub">e00003</code>
            <title>awe</title>
            <ranking>10</ranking>
        </category>
        <category>
            <span>
               <code type="pub">e00004</code>
            </span>
            <title>cat2</title>
            <ranking>1</ranking>
        </category>