XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old June 17th, 2002, 04:53 PM
jefferrs1983 jefferrs1983 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 3 jefferrs1983 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to do "Order by... desc" with XML?

Hi all,

I'm wanting to totally change over from using MySQL to using XML, since I believe that it's the way of the future. And it's a lot of fun trying new things

But anyway, in MySQL I can select some data like in this example SQL statement:

"SELECT message FROM messageTable ORDER BY messageEditDate DESC"

See what I'm doing there? I'm selecting some messages from a database table, ordering the selection by the messageEditDate, in decending order (so the most recently messages appear at the top!).

So, I'd like to know how to do that using XML, in conjunction with *any* programming language. I'm planning to use ASP.NET and PHP4, but any other language is fine. I just want to know what the trick is!

I know the results could be put into any array, and then sorted into the right order - but not in this case. I'm talking about retrieving the data from huge XML files, which are far too large to efficiently load into memory.

I'm stumped. Does anyone else have any ideas? Has anyone else tried to do this before, and if so, how did you do it?

Last edited by jefferrs1983 : June 17th, 2002 at 05:42 PM.

Reply With Quote
  #2  
Old June 25th, 2002, 09:48 AM
binky's Avatar
binky binky is offline
Gerbil
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: In a Rotastak
Posts: 1,763 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 22 h 12 m 52 sec
Reputation Power: 18
Depends what you mean by huge XML files. I have a system that uses a PHP file that obtains XML based data and puts it into a multi-dimensional array. It worked damn quick on something equivalent to a 200+ record result.

The only other way I could think of would be to do some sort of bubble sort, but this would take longer to do.
__________________
- Sorted!

www.ppfuk.com - Free Photo Sharing

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > How to do "Order by... desc" with XML?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway