So in order to run many parallel projects, we are exporting our metadata to XML within version control. As a result we often have to merge changes from multiple projects that affect the same file (a .object or .profile file for instance), and when resolving conflicts, we will occasionally duplicate an item or lose a required element within a block.

Is there a publicly available XSD I can use to validate the metadata files after merge?

1 Answer 1


This might not be considered as an answer but somehow solves the problem you are facing.

Merge conflicts are painful. Different Tools/IDE's retrieve metadata in a different order. So yes when multiple devs merge there will be stupid conflicts that will take an eternity to resolve.

We resolved this using a different approach. We parse the metadata xml and store it in a mysql table. And then recreate a proper XML using the table rows. This kinda makes sure that you get unique values and no matter what tool ide you, your final XML will always be valid and proper.

  • That is a very interesting idea. It would require too much custom development to be immediately actionable for us, but I do like the approach. Perhaps next year. but that said, your parser has to have a reasonably good understanding of the structure of the metadata, and be able to adapt to differant API versions, so how are you handling that without some form of schema definition? do you just assume any immediate child of a file's root is an top level entity (eg how do you note that a given element is a custom field on an object that has a set of child elements constitutiting its settings)? Commented Jun 13, 2018 at 4:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .