Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3666416
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:52:39+00:00 2026-05-19T01:52:39+00:00

I am parsing and displaying an RSS feed in ASP Classic , and I

  • 0

I am parsing and displaying an RSS feed in ASP Classic, and I would like to sort the items by a particular node alphabetically.

Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM.async = False

xmlDOM.setProperty "ServerHTTPRequest", True
xmlDOM.Load("http://myfeedhere.xml")

Set itemList = xmlDOM.getElementsByTagName("item")

''# Then I am getting the values of each node this way:

For Each item in itemList
    For Each child in item.childNodes
        Select case lcase(child.nodeName)
            case "title"
                title = child.text

            case "link"
                link = child.text

            case "fname"
                fname = child.text

            case "lname"
               lname = child.text

            case "media:content"
                media = child.getAttribute("url")
        End Select
    next

I need to sort the itemList by the lname” node, what is the best way to do this..

Adding the title and link to a dictionary object worked for me when I only needed two nodes. I called quicksort on the array of keys and then outputted accordingly. Further I have to be ready for duplicate last names which means the lastname cannot be the key.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:52:40+00:00Added an answer on May 19, 2026 at 1:52 am

    With help and a big thank you to https://web.archive.org/web/20210125130007/http://www.4guysfromrolla.com/webtech/012799-3.shtml
    for the two-dimensional quicksort function
    I worked out a solution (besides telling the client to update to .net and C#)

    …

    dim xmlDOM,itemList,currentLetter
    Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")  
    xmlDOM.async = False  
    
    xmlDOM.setProperty "ServerHTTPRequest", True  
    xmlDOM.Load("http://yourrssfeedhere.xml")
    
    
        Set itemList = xmlDOM.getElementsByTagName("item")
    
        dim itemListLength 
        itemListLength = itemList.length
    
        dim lastIndex
         lastIndex = itemListLength -1 
       'get the value of the last index of all the items
    
        dim byLastName()
    
        redim byLastName(lastIndex,3)
    
      ' set two-dimensinal array indexes, ([lastIndexofItemlist],[#of fields])
    
    
        dim it
    
        For Each item in itemList
        itemCount = itemCount + 1
    
    
    
    
        For Each child in item.childNodes
    
    
        Select case lcase(child.nodeName)
    
    ' loop through each node of item and set variable, set each case for your specific nodes in each <item>
    ' (i.e <category>,<lname>,etc)
    
         case "title"
           title = child.text
    
         case "description"
           description = child.text
    
         case "link"
           link = child.text
    
         case "pubdate"
           pubdate = child.text
    
    
         case "fname"
           fname = child.text
    
         case "lname"
          lname = child.text
    
          case "media:content"
          media = child.getAttribute("url")
    
    
         End Select
    
    
    
         next
    
         i = itemCount-1 
    
    
    
         byLastName(i,0) = title
         byLastName(i,1) = link
         byLastName(i,2) = lname
         byLastName(i,3) = fname
    
    
        next
    
    
    
        dim namesLength
        namesLength = Ubound(byLastName) 
    
     'last index of bylastname
    
    for n = 0 to namesLength
    ' simple output before sort
    Response.Write("<p> Last Name :" & byLastName(n,2) & ", First Name :" & byLastName(n,3) &"</p>")
    next
    
    Response.Write("<p> Sorted:</p>")
    
    
    
     Call QuickSort(byLastName,0,ubound(byLastName,1),2) 
    
    'the last parameter is the field to sort the array on ,
    ' in this case 2 = lname
        for n = 0 to namesLength
        ' output to test sort
        Response.Write("<p> Last Name :" & byLastName(n,2) & ", First Name :" & byLastName(n,3) &"</p>")
    
        next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parseing the rss feed and displaying it but it is showing only one
I'm parsing webpages on a site displaying item data. These items have about 20
I am parsing an RSS feed, and then caching the images from the rss
I'm having a vexing time displaying a remote RSS feed on an intranet site.
In My Application i am parsing the feed from the net as like below
When parsing an xml file in android, I'm doing like this: try { InputStream
I have question about parsing in Html helper : I have sth like: @foreach
I have a problem parsing a XML file which contains special characters like ,
I'm parsing a date from a JSON event feed - but the date shows
Are there any programs for parsing and displaying in a nice format the c++

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.