Skip to main content
Open

Sort XML nodes when saving .fmw files to clean up git diffs

Related products:FME Form
  • January 28, 2025
  • 1 reply
  • 18 views
rmurphy
ax_pflegpeter
n.d
siennaatsafe
+101
  • rmurphy
    rmurphy
  • paulcmax
  • ax_pflegpeter
    ax_pflegpeter
  • n.d
    n.d
  • siennaatsafe
    siennaatsafe
  • LizAtSafe
    LizAtSafe
  • fmelizard
    fmelizard
  • david_r
    david_r
  • takashi
    takashi
  • virtualcitymatt
    virtualcitymatt
  • danilo_fme
    danilo_fme
  • sigtill
    sigtill
  • tcrossman
    tcrossman
  • davideagle
    davideagle
  • fgiron
    fgiron
  • dbaldacchino1
    dbaldacchino1
  • larue
    larue
  • lars_de_vries
    lars_de_vries
  • lorenrouth
    lorenrouth
  • geosander
    geosander
  • kennyo
    kennyo
  • chriswilson
    chriswilson
  • antoine
    antoine
  • paalped
    paalped
  • spatialexjames
    spatialexjames
  • mikael_sweco
    mikael_sweco
  • marko
  • j.frolik
    j.frolik
  • andrewskl
  • sitdifrance
  • xfive57
  • mathline
    mathline
  • fer_ruiz2
  • ottadini
    ottadini
  • arnebrucksch
  • maurice
    maurice
  • bigjonas69
  • mclaudex
    mclaudex
  • anders.avlesen
  • luhu
  • matias
    matias
  • calleuhlenius
  • jlmiserez_inser
    jlmiserez_inser
  • lindsay
    lindsay
  • geojanmov
    geojanmov
  • asmall
    asmall
  • geolassi
    geolassi
  • stijngoedertier
    stijngoedertier
  • kinnjanp
  • simonl
    simonl
  • georgefloros
  • daniii
    daniii
  • stijnverlaar
    stijnverlaar
  • johannafalk
    johannafalk
  • jlmiserez
    jlmiserez
  • pti001
    pti001
  • wunderkind
    wunderkind
  • fer_ruiz
    fer_ruiz
  • db_apha
    db_apha
  • conterra_chrisc
    conterra_chrisc
  • annika
  • jared_bloch
    jared_bloch
  • freddy17
    freddy17
  • maayke
    maayke
  • ekkischeffler
    ekkischeffler
  • edward_skanska
    edward_skanska
  • kelvin.jenkins
    kelvin.jenkins
  • geogaard
    geogaard
  • gabriel_hirsch
    gabriel_hirsch
  • roland.martin
    roland.martin
  • stipica.pavicic
    stipica.pavicic
  • krisvesweco
    krisvesweco
  • havmoejbv
    havmoejbv
  • jneujens
    jneujens
  • qmarquette
  • tono
    tono
  • anari
    anari
  • umapper1
    umapper1
  • geoportalcartog
    geoportalcartog
  • hansh
    hansh
  • vienna
  • jpvo
    jpvo
  • izz88
  • kino
  • atle_hoidalen
    atle_hoidalen
  • bertd
  • jsdbroughton
    jsdbroughton
  • davidrasner5
    davidrasner5
  • sigher
    sigher
  • davidrasner
  • gehrigliwen
  • miphepia
  • gehrigliwen1
  • petri
    petri
  • hannupekkaranta
    hannupekkaranta
  • flxhrmn
  • ras
  • sichenbim
  • c1
    c1
  • antonlarsson
  • b319
  • rbomme
    rbomme
  • thomasmarti
    thomasmarti
  • sakshikosta
  • jamesrichardson
  • rausch
    rausch

sweissman-usfws
Participant

Our team uses a GitLab repository to have a single recorded source for some of our FME Workbench workspaces that get deployed to our FME Flow server.  Whenever we save the files locally and make a new commit, the diff tools comparing the git revisions can become noisy with extra line changes that weren’t actually changes made to the file by the user in FME Workbench.  This is because data series in the XML contents of the .fmw file are input randomly and may input in a different order upon additional saves.

 

Child nodes in arrays under elements like <DATA_TYPES>, <GEOM_TYPES>, <CONNECTIONS>, and <BOOKMARKS> will fully rearrange their order in an inconsistent manner.  This can happen if one entry is removed/added in the list and the workspace file is saved.  This adds a lot of “diff” lines where changes didn’t occur when comparing two versions of the same .fmw file in any external git comparison tool.

 

An example of a rearranging of the child nodes under <CONNECTIONS> causing extra diff lines

 

Please add functionality to sort these series of nodes/values alphabetically by a name attribute so that they are saved to the .fmw file in a consistent manner that doesn’t change between saves.

1 reply

LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • April 10, 2025
NewOpen

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings