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. XML / XSL
  4. xslt: sort xml by child attribute and copy to new xml

xslt: sort xml by child attribute and copy to new xml

Scheduled Pinned Locked Moved XML / XSL
xmlquestion
2 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.
  • C Offline
    C Offline
    crystal9154
    wrote on last edited by
    #1

    Could someone kindly offer me the correct xslt code to sort by factoryNum and copy to new xml, retaining all elements and attributes from original XML? Thanks in advance '****************************** Here's my code but not working: '****************************** Dim xslt As String = "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" '**************************** Here's my source xml: '**************************** Lindeman's Bin 65 1998 6.99 5.99 71.50 Benziger Carneros 1997 10.99 9.50 114.00 Kendall Jackson Vintner's Reserve 1998 12.50 9.99 115.00 Duckpond Merit Selection 1996 13.99 11.99 143.50

    G 1 Reply Last reply
    0
    • C crystal9154

      Could someone kindly offer me the correct xslt code to sort by factoryNum and copy to new xml, retaining all elements and attributes from original XML? Thanks in advance '****************************** Here's my code but not working: '****************************** Dim xslt As String = "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" '**************************** Here's my source xml: '**************************** Lindeman's Bin 65 1998 6.99 5.99 71.50 Benziger Carneros 1997 10.99 9.50 114.00 Kendall Jackson Vintner's Reserve 1998 12.50 9.99 115.00 Duckpond Merit Selection 1996 13.99 11.99 143.50

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      Demanding help and insulting members who volunteer their expert assistance is pitiful! As far as your problem is concerned, I would place the result of the sorted nodes in a variable. Then, I would copy the sorted nodes in the variable.

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      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