EnglishFrenchSpanish

OnWorks favicon

xmlsortp - Online in the Cloud

Run xmlsortp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command xmlsortp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


xmlsort - sorts 'records' in XML files

SYNOPSIS


xmlsort -r=<recordname> [ <other options> ] [ <filename> ]

Options:
-r <name> name of the elements to be sorted
-k <keys> child nodes to be used as sort keys
-i ignore case when sorting
-s normalise whitespace when comparing sort keys
-t <dir> buffer records to named directory rather than in memory
-m <bytes> set memory chunk size for disk buffering
-h help - display the full documentation

Example:
xmlsort -r 'person' -k 'lastname;firstname' -i -s in.xml >out.xml

DESCRIPTION


This script takes an XML document either on STDIN or from a named file and writes a sorted
version of the file to STDOUT. The "-r" option should be used to identify 'records' in
the document - the bits you want sorted. Elements before and after the records will be
unaffected by the sort.

OPTIONS


Here is a brief summary of the command line options (and the XML::Filter::Sort options
which they correspond to). For more details see XML::Filter::Sort.

-r <recordname> (Record)
The name of the elements to be sorted. This can be a simple element name like
'person' or a pathname like 'employees/person' (only person elements contained
directly within an employees element).

-k <keys> (Keys)
Semicolon separated list of elements (or attributes) within a record which should be
used as sort keys. Each key can optionally be followed by 'alpha' or 'num' to
indicate alphanumeric of numeric sorting and 'asc' or 'desc' for ascending or
descending order (eg: -k 'lastname;firstname;age,n,d').

-i (IgnoreCase)
This option makes sort comparisons case insensitive.

-s (NormaliseKeySpace)
By default all whitespace in the sort key elements is considered significant.
Specifying -s will case leading and trailing whitespace to be stripped and internal
whitespace runs to be collapsed to a single space.

-t <directory> (TempDir)
When sorting large documents, it may be prudent to use disk buffering rather than
memory buffering. This option allows you to specify where temporary files should be
written.

-m <bytes> (MaxMem)
If you use the -t option to enable disk buffering, records will be collected in memory
in 'chunks' of up to about 10 megabytes before being sorted and spooled to temporary
files. This option allows you to specify a larger chunk size. A suffix of K or M
indicates kilobytes or megabytes respectively.

Use xmlsortp online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad