Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] help in XML diff->patch->apply
[EMF Compare] help in XML diff->patch->apply [message #620820] Fri, 17 April 2009 09:26
fermo is currently offline fermoFriend
Messages: 11
Registered: July 2009
Junior Member
Hello,

I'd like to use the EMF to compare xml files (not xml schema files), then
create diff model, store this one (like Epatch) and finally I'd like to
apply the patch on one xml file.

I can read, match, diff files...
Then I'd like to use Epatch to create a patch from the match and diff
models, but I got an exception.

It's my code:
public void testMatchDiffXML() throws Exception {
ResourceSet resourceSet = new ResourceSetImpl();
EObject root1 = getDocumentRoot(FILE1_PATH, resourceSet);
EObject root2 = getDocumentRoot(FILE2_PATH, resourceSet);

MatchModel matchModel = MatchService.doMatch(root1, root2, null);
DiffModel diffModel = DiffService.doDiff(matchModel);

DiffEpatchService.createEpatch(matchModel, diffModel, "name");

}

It is possible that I made something wrong during resource loading...

I'm wandering is the main concept (load XML files -> diff -> patch ->apply
patch) is possibly by EMF?

Thanks,
Fermo
Previous Topic:Compare BPEL files
Next Topic:Getting start with emf compare
Goto Forum:
  


Current Time: Thu Apr 25 01:54:38 GMT 2024

Powered by FUDForum. Page generated in 0.02277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top