Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
License

Names tutorial



This tutorial presents two XML files and the results of the comparison with a Rules configuration specifying the identification of the nodes.

Files to compare

The left file[1] :
   <theRoot>
      <parent name="Paul">
         <child name="Rick" />
         <child name="John" age="18"/>      
      </child> 
   </theRoot>
The right file[2] :
   <theRoot>
      <parent name="Paul">
         <child name="John" age="32"/>
         <child name="Rick" />
      </child> 
   </theRoot>

Default comparison

Main Article: Default comparison

The default comparison between the XML files will present the following result:
tutorial2_1

Comparison with nodes identification

Main Article: nodes identification

The following Rules configuration specify that[3] :
  • The node identification is the name attribute of the node
  • The ordering of nodes is not significant
   <nodeRules>
      <defaultRule orderIsSignificant="false">
         <identification>
            <attribute name="name" />
         </identification>
      </defaultRule>
   </nodeRules>
The comparison will present the following result:
tutorial2_2

Notes

See also


Categories: tutorials

xmldiff Copyright (c) 2024 Herve Girod. All rights reserved.