473,408 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

how to sort xml data?

hi there...

i have some questions. Did anyone know how to sort a group of data in xml file? i means, i have retrieve the xml data, but it not arrange properly. For example:
<number>
<data1>4</data1>
<data1>2</data1>
<data1>5</data1>
<data1>1</data1>
<data1>3</data1>
</number>

output that i need:1,2,3,4,5

can anyone help me, please?
Oct 13 '06 #1
1 7147
ev951
2
hi there...

i have some questions. Did anyone know how to sort a group of data in xml file? i means, i have retrieve the xml data, but it not arrange properly. For example:
<number>
<data1>4</data1>
<data1>2</data1>
<data1>5</data1>
<data1>1</data1>
<data1>3</data1>
</number>

output that i need:1,2,3,4,5

can anyone help me, please?
sakurasyi,

If you are using an xsl file as a stylesheet for your xml file then you should try placing the code below into your xsl file. I hope this helps.

Expand|Select|Wrap|Line Numbers
  1.  <xsl:sort data-type="number"/>
  2.  
Elliot
Oct 17 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: lawrence | last post by:
Is there an easy way to sort a 2 dimensional array alphabetically by the second field in each row? Also, when I use sort() on a two dimensional array, it seems to work a lot like...
1
by: Michael Hill | last post by:
I have a section of a stylesheet (below) I am trying to configure. The part I am having trouble with is the when test. I have a series of pulldowns that I can select from, some are text and some...
3
by: Kevin King | last post by:
I have a question about an assignment I have. I need to count the number of comparisons in my merge sort. I know that the function is roughly nlog(n), but I am definately coming up with too many...
40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
1
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting,...
48
by: Alex Chudnovsky | last post by:
I have come across with what appears to be a significant performance bug in ..NET 2.0 ArrayList.Sort method when compared with Array.Sort on the same data. Same data on the same CPU gets sorted a...
8
by: markww | last post by:
Hi, If I have a vector of structs like this: struct IMAGE { unsigned char *pPix; string strName; int nNumber; };
0
by: JosAH | last post by:
Greetings, I was asked to write a Tip Of the Week; so here goes: a lot of topics are started here in this forum (and a lot of other forums too) mentioning a problem about sorting data. ...
4
by: t3chn0n3rd | last post by:
Do you think it is relatively easy to write sort algorithms such as the common Bubble sort in Python as compared to other high level programming langauges
0
by: kronus | last post by:
Hi everyone, Please tell me what I am doing wrong: I have an xml data coming to my Air application that looks something like this: <project name="Sales Demos" path="/Company Home/Client...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.