Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. XMl Node Sorting Based on Length

XMl Node Sorting Based on Length

Scheduled Pinned Locked Moved C#
csharpalgorithmsxmlhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prabhakar dwivedi
    wrote on last edited by
    #1

    Hi all I have one problem in C# that is related to XMl Sorting...That is Based On the text Length Languuage:C# <person> <fname>Joe</fname> <fname>Prabhakar</fname> <fname>ABBBBBBBBCCCCCCCCCC</fname> </person> I want this XML as <person> <fname>ABBBBBBBBCCCCCCCCCC</fname> <fname>Prabhakar</fname> <fname>Joe;lt;/fname> </person> see the sorting is not based on Accending or decending order it's based on the length of the text Hope this question is Clear to you Thanks

    prabhakar dwivedi

    J 1 Reply Last reply
    0
    • P prabhakar dwivedi

      Hi all I have one problem in C# that is related to XMl Sorting...That is Based On the text Length Languuage:C# <person> <fname>Joe</fname> <fname>Prabhakar</fname> <fname>ABBBBBBBBCCCCCCCCCC</fname> </person> I want this XML as <person> <fname>ABBBBBBBBCCCCCCCCCC</fname> <fname>Prabhakar</fname> <fname>Joe;lt;/fname> </person> see the sorting is not based on Accending or decending order it's based on the length of the text Hope this question is Clear to you Thanks

      prabhakar dwivedi

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      that's a pretty straightforward problem with an equally straightforward solution: 1. read the XML doc 2. remove the nodes 3. sort the nodes 4. add the nodes back to the doc 5. save the doc I'd recommend an XmlDocument[^] for this.

      P 1 Reply Last reply
      0
      • J Jimmanuel

        that's a pretty straightforward problem with an equally straightforward solution: 1. read the XML doc 2. remove the nodes 3. sort the nodes 4. add the nodes back to the doc 5. save the doc I'd recommend an XmlDocument[^] for this.

        P Offline
        P Offline
        prabhakar dwivedi
        wrote on last edited by
        #3

        Thanks to you .. i Know this but i am looking for any in build function provided by .Net for sorting XML doc Thanks

        prabhakar dwivedi

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups