Jump to: navigation, search

Comparing XML files with EMF Compare

THIS PAGE IS ARCHIVED. IT IS PROBABLY OUTDATED AND WILL NOT BE UPDATED

Setting up EMF-XSD

You first need to make sure EMF is able to load your XML file as a model. To do so you need an XML Schema description of your XML file. Please follow the steps described in the "Generating an EMF Model using XML Schema (XSD) ".

Once you are able to load your XML file and see it as a model, move on the EMF Compare part !

Activating EMF Compare on your file extension

EMF compare uses a content-type to know whether it should be used for comparison. This content-type will initially register itself against *.ecore and *.uml files. You may add your own extension using the Preferences view / Global / Content-types and adding your file extension in the "EMF Compare" content-type.

EMFComparePreferences-content-type.png

For instance, if your XML extension is "library" like in the EMF tutorial, then add *.library in the EMF Compare content-type.


Let's go !

You are now able to compare and merge your XML files just like any other model !

EMFCompare-xml.png