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
sweissman-usfws
geomancer
danilo_fme
revesz
tva
+2
  • sweissman-usfws
    sweissman-usfws
  • geomancer
    geomancer
  • danilo_fme
    danilo_fme
  • revesz
    revesz
  • tva
    tva
  • phoeffler
    phoeffler
  • soeren
    soeren

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