// xmlsort: swiss army knife xml ordering utility

Goal

Sort an xml file or parts of it to avoid false positive differences comparing it with a previous version (stored in a version control system like GIT or Mercurial).

Did you have some experience changing 1 thing only in a server, dump again data and obtain dozens of changed files like this ?

diff --git a/geonode.xml b/geonode.xml
index f4fc60f..ffcdbfc 100644
--- a/geonode.xml	2012-10-24 09:25:42.198961002 +0200
+++ b/geonode.xml	2012-10-24 09:26:58.034957830 +0200
@@ -19,12 +19,12 @@
     <entry key="namespace">http://geonode.org/</entry>
     <entry key="schema">the_schema</entry>
     <entry key="Loose bbox">true</entry>
-    <entry key="Expose primary keys">false</entry>
     <entry key="fetch size">1000</entry>
     <entry key="Max open prepared statements">50</entry>
+    <entry key="Expose primary keys">false</entry>
+    <entry key="user">MYUSER</entry>
     <entry key="preparedStatements">false</entry>
     <entry key="Estimated extends">true</entry>
-    <entry key="user">MYUSER</entry>
     <entry key="min connections">1</entry>
   </connectionParameters>
   <__default>false</__default>

xmlsort helps you to avoid this very annoing situations.

Dependencies

xmlsort depends from libxml2 and argparse libraries.

The program

xmlsort is a single python program.

It can work in some different ways:

  • called without filtering arguments sort all elements of the xml file
  • called with <-i|--include> <xpath> <depth> argument[s] sort matching <xpath> elements only and their children recurring <depth> times
  • called with <-x|--exclude> <xpath> argument[s] sort all elements except elements matching <xpath> and their children

How it works

xmlsort follow few simple steps.

For each node matching –include <xpath> arguments or all if –include is not defined:

  • sort alphabetically attributes of the starting tag
  • if there are sub-elements:
    • recure into each of them (accordingly with the <depth> and with –exclude arguments)
    • sort all sub-elements following the rules:
      • sort all sub-elements comparing tag names
      • if equal comparing attributes name
      • if equal comparing attribute contents
      • if equal comparing sub-elements

Limitations

  • All kind of implicit sorted lists are not supported (defined by xml schema)
  • Standard input is not supported
  • Packaging is still missing

References

Comments

Stuartrago
No. 1 @ 2016/10/18 12:53

central florida health care <a href=http://www.onweb.fr/?company_id=17296>acheter meridia en france</a> what does orthopedic doctor do

DouglasGOx
No. 2 @ 2016/11/11 10:19

my brother is a drug addict <a href=http://reductil.creatupropiaweb.com/>donde comprar reductil en chile</a> brand name viagra online

Williamlow
No. 3 @ 2016/12/13 18:39

advocate health care email <a href=http://rivotril.asso-web.com/>acheter rivotril gouttes belgique</a> what is orthopedic doctor

Anthonyst
No. 4 @ 2016/12/14 09:03

oxford healthcare jackson ms <a href=http://reductil.oneminutesite.it/>comprare reductil online</a> tips on how to pass a drug test

Charleskr
No. 5 @ 2016/12/15 02:34

anti anxiety prescription drugs <a href=http://trankimazin.mex.tl/>http://trankimazin.mex.tl/</a> pass a drug test in a day

RobertFug
No. 6 @ 2016/12/15 16:49

emergency medicine residency programs list <a href=http://adderall.onlc.be/>acheter adderall en ligne</a> medco prescription phone number

StevenMt
No. 7 @ 2016/12/16 14:57

prescription strength anti inflammatory <a href=http://methylphenidate.eventsbot.com/>buy methylphenidate</a> polaroid 7 inch tablet reviews

CharlesFub
No. 8 @ 2016/12/31 14:34

health benefits of ginger root <a href=http://tavor.soup.io/>tavor kaufen schweiz</a> hemp seeds drug test

CharlesFub
No. 9 @ 2017/01/02 23:20

watson 387 white pill <a href=http://www.stesolid.cybersite.nu/>kopa stesolid pa natet</a> buy soma online without a prescription

CharlesFub
No. 10 @ 2017/01/10 11:29

yasmin birth control pill <a href=http://rivotril.bloggo.nu/>kjope rivotril</a> 30 inch medicine cabinet

CharlesFub
No. 11 @ 2017/01/11 00:45

doctor who series 2 <a href=http://meridia.top-depart.com/>acheter meridia en france</a> best note taking tablet

Sggnrol
No. 12 @ 2017/01/24 05:48

Such male enhancement supplements can be purchased and used without the difficulty for a recipe, <a href=“http://kamagra100uk.com/#alternativeoutput.it-kamagra-uk”>kamagra</a> and human beings unquestionable purchaser testimonials attest to the claimed benefits of these herbal supplements. Of route, http://kamagra100uk.com/ kamagra as with all supplements, it is prominent to research each product on the eve of making any purchases. To induce this treat easier, we’ve entranced the without delay to state look after central message on what to foresee from virile enhancement supplements.

Stewartnex
No. 13 @ 2017/01/25 12:25

wh0cd202217 <a href=http://amoxilonline.club/>click</a> <a href=http://buyaygestin.webcam/>buy aygestin</a> <a href=http://clomid-online.cricket/>clomid</a> <a href=http://nolvadex-pct.cricket/>nolvadex pct</a> <a href=http://buy-kamagra.pro/>kamagra</a> <a href=http://ampicillin247.top/>ampicillin generic</a>

cialis over the counter france
No. 14 @ 2017/01/28 14:43

Decide proper for yourself what you invent on every side the brand-new constitution care law, http://cialisovercounteratwalmart.top/#28489 walmart price for cialis based on the facts and not the talking points. TIP: We strongly urge enrolling in coverage minute considering the annul function has http://cialisoverthecounterwalmart.top/ cialis over the counter at walmart begun. Unqualified enrollment ends January 31st, 2017. In a worst in the event that outline, this could be the form moment to enroll in coverage with http://cialis-overthecounteratwalmart.top/ cialis over the counter charge aid until an ObamaCare replacement plan is in place. Form minute shoppers may not persuade an capacity this year.

ilavtf
No. 15 @ 2017/01/29 03:52

A universal ObamaCare allegory is that the majority of http://viagraohnerezeptausdeutschland.com/#46747 sildenafil rezeptfrei kaufen want to enquire the law repealed because they don’t want healthcare reform. While diverse Americans do have a yen for to catch sight of the law repealed more http://sildenafilohnerezept.net/ viagra ohne rezept aus deutschland support the law, hope for to determine the law improved, or don’t support it because it doesn’t do sufficiently http://viagracoupon.us.com/ viagra coupon code (towards instance people wanted unique payer instead.)

international pharmacy
No. 16 @ 2017/01/30 21:00

According to the CDC and http://pharmacyatcvs.com/ canadian pharmacy evidence, suitable the commencement three months of 2016 the uninsured kind was 8.6% down from 9.2% pattern year, and from 15.7% prior to the Affordable Attention Exploit was signed into law http://www.flagylvip.com/ metronidazole oral. After just the 18 -64 demographic the same study shows the uninsured standing at 11.9%, http://noscriptcanadapharmacy.com/ canadian pharmacy down from 13% in 2015, down from 22.3% in 2010 when the ACA was signed into law. These take on the lowest http://onlinepharmacynoscript.com/ canadian online pharmacies uninsured rates in over 50 years according to the studies (which are all based on census text).

Sfgupyt
No. 17 @ 2017/02/01 12:28

The banknote http://viagra.overthecounteratwalmart.com/ viagra cost was introduced on October 29, 2009 and passed on November 7, during the 1st Session of the 111th Congress. Its foremost underwrite was the Dean of the Clan, John Dingell of Michigan http://ciprofloxacin.500mgantibiotics.com/ antibiotic cipro. The paper money is a revised portrayal of an earlier litmus test, the proposed America's Affordable Constitution Choices Shtick of 2009 (HR 3200). The revisions included refinements designed to fulfil the http://viagra.withoutadoctorprescription.com/ viagra without a doctor prescription goals outlined in the President's speak to a collaborative term of Congress in September, 2009 relating to salubriousness care reform. In 1989 the position pro the “solitary mandate” that every household one's hands on not at all bad constitution care was proposed close to a unprogressive believe tank known as the Heritage Basement http://cialis.overthecounteratwalmart.com/ cialis over the counter at walmart and supported in congress by means of anticyclone profile republicans Newt Gingrich, Orin Concoct and Charles Grassley in 1993.

viagra without a doctor prescription
No. 18 @ 2017/02/02 09:07

Veracious immediately, the federal control subsidizes Medicare premiums http://viagra.withoutadoctorsprescription.com/ viagra without a doctor prescription those of the habitual program, as well as private representation alternatives that participate in Medicare Advantage. The subsidies are established so that they become larger at the position of http://levitra.withoutadoctorsprescription.com/ levitra price walmart entire per enrollee Medicare spending. No thing what Medicare costs, older Americans http://cialis.withoutadoctorsprescription.com/ cialis without a doctors prescription can be steady that the direction will-power lie on a trustworthy percentage of it. That’s the primary reaction that panics monetary conservatives, because that costs the sway more each year.

meds for anxiety
No. 19 @ 2017/02/03 06:07

The individual mandate says all http://cephalexin.500mgantibiotics.com/ cephalexin 500 Americans who can in trouble with vigour security have to buy health coverage, take an immunity, or pay a fee. That creates an unused complication with regards to filing taxes. Some folks who right-minded only just leave out the http://metronidazole.500mgantibiotics.com/ flagyl 400 Federal Poverty Level limit of 400% are paste the hardest as they don’t be fit to assistance. Those who do come sell for benefit wishes http://anxiety.medicationsoverthecounter.com/ anxiety medication list neediness to adjust tax credits on the 8962 – Thin on the ground b costly Tax Acclaim form. To get diverse of the exemptions, you’ll demand to submit a pose to HealthCare.Gov or file the http://www.sildenafilkamagrauk.com/ kamagra – Exemptions form.

cialis at walmart
No. 20 @ 2017/02/03 19:38

Elect for yourself what you cogitate on on every side the new health trouble law, http://tadalafiloverthecounteratwalmart.top/ cialis 20 mg walmart price based on the facts and not the talking points. TIP: We strongly call to mind enrolling in coverage once in a blue moon bearing in mind the revoke course of action has http://tadalafil-overthecounteratwalmart.top/#70688 cialis over the counter at walmart begun. Unbarred enrollment ends January 31st, 2017. In a worst case scenario, this could be the matrix opportunity to enroll in coverage with http://cialisoverthecounteratwalmart.top/#53992 cialis generic sell for support until an ObamaCare replacement envisage is in place. Last memorandum latest shoppers may not persuade an span this year.

generic viagra
No. 21 @ 2017/02/05 19:34

Indemnity companies be obliged dress sick people, http://viagragenerique100.com/#32163 viagra en ligne and this increases the tariff of everyone’s insurance. To ensure people don’t just acquisition bargain coverage when they requisite it, most people must obtain coverage or pay a per-month fee. Also, coverage can contrariwise be obtained during annual open enrollment periods. Undivided can on account of the compensation charges to forgetting to pass on http://genericviagra.us.com/ generic viagra a prize, and then not be accomplished to stimulate coverage until next unlatch enrollment. Some people were benefiting from being in a low-risk group. Men in positive robustness with no pre-existing conditions, http://viagrawithoutadoctorprescriptions.net/#68346 viagra without a doctor prescription who were not reliable as a replacement for anyone but themselves, and who remained bracing had miserable surety costs. They may be subjected to had reasonable restrictive coverage in the past the extra hikes took occupation in 2014.

0AchFrNet
No. 22 @ 2017/02/06 17:34

Commander Propecia <a href=“http://propecia.e-monsite.com/”>propecia</a> sans ordonance

azithromycin 500mg
No. 23 @ 2017/02/06 23:39

The Affordable Be responsible for Scenario contains some negatives, http://www.onlinepharmacy.top/ canadian pharmacy but we essential to provoke b request ourselves this matter: Do the costs surpass the benefits? The average American has a destiny to gain and small to lose. Those making more, including larger firms and ergo their employees, may fathom negative economic effects. While some groups better more than others, http://www.azithrovlad.com/#76045 zpak most Americans wishes aid from the uncharted rights and protections like guaranteed coverage of pre-existing conditions and the elimination of http://canadianonlinepharmacy.website/ 24 hour pharmacy gender discrimination. Your health warranty costs may set up in the abbreviated disparage, but the mark of your surety just got a destiny better. Below we will also consult on the pros and cons of ObamaCare in regards to the brevity, http://onlinepharmacywalmart.com/#87563 canada pharmacy online healthcare costs, and the healthcare toil in general.

Sbtrnwwl
No. 24 @ 2017/02/07 22:48

When hearing about the Affordable Anguish Act http://viagra.100mg.top/ viagra pricing 100mg walmart (ObamaCare), the earliest suspect that comes to affronted by is, how last will and testament ObamaCare impress me, my ancestry, and my business? The answer, of certainly, depends on a platoon of factors including receipts and whether or not you currently attired in b be committed to form insurance. Not worth we announce down different segments of the http://www.viagraonline.us.com/ free viagra population and examine how each will be seized during this trim keeping law.

WinstonElurn
No. 25 @ 2017/02/07 23:48

thanks benefit of this great edifying website, obstruct up the great work check out this <a href=http://onlinecasinos-x.com>casino</a> offers

WinstonAtrob
No. 26 @ 2017/02/07 23:50

thanks due to the fact that this countless illuminating website, obstruct up the great work check out this <a href=http://onlinecasinos-x.com>casino online</a> offers

WinstonElurn
No. 27 @ 2017/02/08 19:56

thanks for this countless illuminating website, obstruct up the skilled undertaking check out this <a href=http://onlinecasinos-x.com>online casino</a> offers

WinstonAtrob
No. 28 @ 2017/02/08 19:57

thanks benefit of this significant edifying website, living up the momentous undertaking check out this <a href=http://onlinecasinos-x.com>casino</a> offers

cialis 20 mg walmart price
No. 29 @ 2017/02/10 11:13

Conclusion in behalf of yourself what you deem about the brand-new form sadness law, http://cialisovercounteratwalmart.top/#36744 cialis over the counter at walmart based on the facts and not the talking points. NOTIFY: We strongly call to mind enrolling in coverage at once considering the repeal function has http://cialisoverthecounterwalmart.top/#52235 generic cialis at walmart begun. Unbarred enrollment ends January 31st, 2017. In a worst if it happens outline, this could be the matrix moment to enroll in coverage with http://cialis-overthecounteratwalmart.top/ cialis at walmart sell for aid until an ObamaCare replacement drawing is in place. Pattern transcript shoppers may not clear an capacity this year.

hvk97j
No. 30 @ 2017/02/11 19:12

Unlike ObamaCare which has concealed and http://100mg.top/#22317 viagra 100mg public cover and private healthcare, a cull payer system would have projected indemnification and private healthcare. Other terms used to describe one payer count: http://canadianpharmacy.gdn canadian online pharmacy community opportunity, universal haleness punctiliousness, national robustness anguish, and Medicare-for-all. That coverage is offered http://ciailscoupon.com/#80549 cialis.com days a year. Marketplace subsidies can help cut insurance costs too, http://www.20mgtadalafil.top/ cialis 20mg but that coverage is just offered during bare enrollment. Learn more tips and tricks in all directions getting free or low cost coverage next to reading our Vacant ObamaCare Orientate, common to our grapheme up episode, or on visiting HealthCare.Gov!

viagra no prior prescription
No. 31 @ 2017/02/12 12:27

From 20 million will be exempt from the payment at near 2016. Those with exemptions can often still arrive at http://viagrawithoutdoctorsprescription.org/#65211 viagra without a doctor prescription set someone back assistance. Exemptions also make the grade you in place of rare enrollment. There are now more concealed coverage options, and all grave medical coverage options must produce least leading coverage alternativeoutput.it.

jalnks
No. 32 @ 2017/02/13 18:34

You leave be without hinder notified if we the wire respecting anything more than your prescription. Without the documents mentioned more than, http://viagrawithoutadoctorprescriptions.org/ viagra without a doctor prescription conclusion not be wizard to command and freight your order.

cucx12
No. 33 @ 2017/02/14 00:14

Worth The Affordable Solicitude Law is the most weighty form care legislation enacted in the Harmonious States since the creation of Medicare and Medicaid in 1965. The law implemented encyclopedic reforms http://viagrawithoutadoctorsprescription.org/#67537 viagra without a doctor prescription designed to modernize the accessibility, affordability, and quality of health care.

Jasonsog
No. 34 @ 2017/02/14 07:12

study ended this <a href=http://onlinecasino-xx.com>casino</a> where you can conquer legal notes with the help of this guidebookPlaying <a href=http://onlinecasinos-x.com/online-baccarat.html>baccarat</a>

JasonTob
No. 35 @ 2017/02/14 07:14

block ended this <a href=http://onlinecasino-xx.com>online casinos</a> where you can collect legal kale with the help of this lightPlaying <a href=http://onlinecasinos-x.com/online-baccarat.html>baccarat online</a>

Syvutwpv
No. 36 @ 2017/02/16 04:53

WASHINGTON — On the issue of trim caution, Sens. Bernie Sanders (I-Vt.) and Ted Cruz (R-Texas) agree on very little. Identical of the more ardent exchanges came after Sanders asked Cruz if he believes, http://www.viagrawithoutdoctorprescription.accountant/ viagra online without prescription usa as Sanders does, that every American is entitled to constitution care as a right.

gdi48i
No. 37 @ 2017/02/17 17:09

Value The Affordable Sadness Performance is the most material healthfulness circumspection legislation enacted in the United States since the formation of Medicare and Medicaid in 1965. The law implemented encyclopedic reforms http://viagra-withoutadoctorsprescription.org/#16286bw buy viagra without a prescription designed to improve the accessibility, affordability, and mark of condition care.

hcutpf
No. 38 @ 2017/02/17 21:05

Its set one's sights on is elementary - to continue vigour warranty http://viagrawithoutdoctorsprescriptions.org/#ow54346 viagra without a doctor prescription coverage to some of the estimated 16% of the US population who require it. Those people take into one's possession no coverage from their employers and are not covered during US condition programmes after the impecunious and elderly.

aalksa
No. 39 @ 2017/02/20 00:42

The Assiduous Custody and Affordable Care Mandate was signed into law Walk 23rd, 2010 and upheld alongside a greatest court ruling on June 28, 2012. During the ruling, the law was changed to allow states to http://tadalafilcoupon.top/#60264 cialis.com opt-out of expanding access to Medicaid. Learn more there Medicaid Flourishing and how this a specific barely change has socialistic millions without http://tadalafilforsale.top/#ljbkb.html discount cialis health insurance. The law requires all Americans participate in well-being indemnity by 2014 (or reward a per month payment for each month without lowest essential coverage). Although this shared responsibility provision http://tadalafildaily.top/ cialis for daily use cost is unofficially called an own mandate, it was ruled to be in the poop indeed a tax and not a mandate away the June 28, 2012, Superb Court ruling.

Leave a comment…



  • E-Mail address will not be published.
  • Formatting:
    //italic//  __underlined__
    **bold**  ''preformatted''
  • Links:
    [[http://example.com]]
    [[http://example.com|Link Text]]
  • Quotation:
    > This is a quote. Don't forget the space in front of the text: "> "
  • Code:
    <code>This is unspecific source code</code>
    <code [lang]>This is specifc [lang] code</code>
    <code php><?php echo 'example'; ?></code>
    Available: html, css, javascript, bash, cpp, …
  • Lists:
    Indent your text by two spaces and use a * for
    each unordered list item or a - for ordered ones.