473,890 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to SORT a large XML file?

3 New Member
I am searching for a way to sort XML data on very large files on a UNIX enviroment. Also, I am very new to XML and UNIX as I am an IBM Mainframe person. Any help or examples would be appreciated.

Feb 27 '07 #1
6 8914
Varun Gupta
13 New Member
I am searching for a way to sort XML data on very large files on a UNIX enviroment. Also, I am very new to XML and UNIX as I am an IBM Mainframe person. Any help or examples would be appreciated.


You can store XML files in flat files in unix , extension hardly means in unix becoz unix treates all the devices and folders as files. but then type of file could differ.
To sort file you can use sort command OR for sort on the basis of particular patterns in that file you better can use sed / awk commands.

sed 'script' filename

where script contains..
/pattern/ action
here /pattern/ which you want to search for sorting and
action is ..what ever ou want to perform on the file. (as you want sorting as an action on the pattern.)
Mar 3 '07 #2
511 Recognized Expert Contributor
I am searching for a way to sort XML data on very large files on a UNIX enviroment. Also, I am very new to XML and UNIX as I am an IBM Mainframe person. Any help or examples would be appreciated.

For XML manipulation, you can use powerful languages such as Perl/Python that comes with XML parsers that makes parsing XML easy. I am sure you have these tools available on your machine.
eg Perl XML parser . If not, sed/awk and the likes of Unix tools can also be used, albeit a bit tedious.
Mar 3 '07 #3
1 New Member
CoSort for Unix, Version 9, now sorts (and converts to/from) large, flat XML files, among other mainframe (index) and sequential (csv, ldif, etc.) file formats. CoSort also has JCL sort parm conversion tools for MVS and VSE migrations.

Please see
May 17 '07 #4
3,237 Recognized Expert Specialist
Regular expressions are always a solid way to go.
May 18 '07 #5
511 Recognized Expert Contributor
regexp are powerful, but it also depends. if the code is full of regexp, and if something breaks, they make it difficult for administrator/code maintainer to debug and troubleshoot.
May 19 '07 #6
CoSort 9.1.3 also runs on Windows for large, flat XML file sorts.
Nov 12 '10 #7

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

Similar topics

by: One's Too Many | last post by:
Ran into a strange problem today: 8.1.7 on AIX 4.3.3 Database and applications had been working fine for two years and all of a sudden a couple of regularly-run queries are now no longer coming out in correct sort order specified in the ORDER clauses of the select statements. Behavior is erratic, about half the time the sort order is correct, and the other half is not. All expected rows are being returned (no data is missing) and the...
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 number of records. Both these numbers are known
by: Eva | last post by:
Hi, I try to implement quick sort. I sort vectors by their first value. 10 2 3 4 9 3 5 6 10 4 5 6 must be 9 3 5 6 10 2 3 4 10 4 5 6 The prog works great on maybe 500 vectors, but I have an "Aborted(core
by: Xah Lee | last post by:
Sort a List Xah Lee, 200510 In this page, we show how to sort a list in Python & Perl and also discuss some math of sort. To sort a list in Python, use the “sort” method. For example: li=;
by: Frank | last post by:
I have a text file, one word per line. I want to arrange the lines alphabetically so I opened it into MS Word and asked Word to sort it. Word said that the list was too big for it. I figure I'll write a program to sort the file. But I wonder if Word can't handle it what things I'll run into and what's the best way to proceed. I have no idea what kind of limits the are on array sizes and such.
by: Woody Ling | last post by:
In 32 bits DB2 environment, is it meaningful to set sheapthres larger than 256MB for the following case.. 1. Intra-parallel is ON 2. Intra-parallel is OFF
by: ShaveDave27 | last post by:
Hi, I've created a Person Class with a comparable interface. And i've created an ArrayList People with varaibles from the person class in - First_name, Surname, Month(Birthday), Day(Birthday). Now i need to use selection sort to sort my arraylist into birthday order. In the Person Class i have a method which gives each person a different number for every possible birthday there is. I have created a selction sort but dont know how to call...
by: ShaveDave27 | last post by:
HI, I've created a Comparable interface class Person. Which has variables First_name, surname, month(Of birth), day(Of birth) , and birthday(which i have created from month and day). I have a compareTo method which will compare two person objects by the birthday. If the birthday are the same it outputs int 0, if one is bigger it outputs int 1 and if the other one is bigger it outputs int -1. I have also created an arraylist called people,...
by: dotyet | last post by:
Hello Everyone, I have a mixed workload DB2 UDB 8.2 FP 14 Windows x64 database. The database performs as per the expectations. I have just one small question. The sort related parameters are configured as follows: Sort heap threshold (4KB) (SHEAPTHRES) = 50000 Sort list heap (4KB) (SORTHEAP) = 4096 According to the snapshots samples (taken over 3 or 4 snapshots over a
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.