SimDesign

SimDesign software users forum
It is currently Tue Jun 18, 2013 9:01 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Diff between 2 XML files
PostPosted: Thu Apr 21, 2011 11:19 pm 
Offline
Junior Member

Joined: Thu Apr 21, 2011 11:10 pm
Posts: 1
I am using the function IsEqualTo to find the differences between 2 XML files.
the difference between the 2 files can be an added node, or a different attribute value.

I want to display on bold the missing node, or the different attribute value.
Reading the Mismatches List, I can have a fullpath giving m a list of nodes or a specific node.

my problm is that in case of a list of Nodes having the same name, I don't know on which one the diff is present.

exemple:
File 1:
<name 1>
<name12 att1=val1 ..... />
<name12 att1= val2 .... />
<name12 att1= val3 ...... />
</name1>

File 2:
<name 1>
<name12 att1=val1 ..... />
<name12 att1= val3 ...... />
</name1>

The missing one is :
<name12 att1= val2 .... />


thank you for your help

Salomon


Top
 Profile  
 
PostPosted: Fri Aug 12, 2011 9:27 pm 
Offline
Site Admin
User avatar

Joined: Tue Jan 20, 2004 3:59 pm
Posts: 1425
Location: Hellevoetsluis, Netherlands
The only difference seems to be the number of nodes in the <name1> element. You can detect that with an IsEqualTo() using non-default Options (TXmlCompareOptions), using xcChildCount:

Code:
  TXmlCompareOption = (
    xcNodeName,
    xcNodeType,
    xcNodeValue,
    xcAttribCount,
    xcAttribNames,
    xcAttribValues,
    xcChildCount,
    xcChildNames,
    xcChildValues,
    xcRecursive
  );


Success, Nils


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group