Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This might be very problematic to do with a standard diff tool if the xml "nodes" are in any way similar. For example:</p> <p>file1:</p> <pre><code>1 &lt;node id="1" /&gt; 2 &lt;node id="2a"&gt; 3 &lt;content item="1"/&gt; 4 &lt;content item="2a"/&gt; 5 &lt;/node&gt; 6 &lt;node id="3" /&gt; </code></pre> <p>file2:</p> <pre><code>1 &lt;node id="1" /&gt; 2 &lt;node id="2b"&gt; 3 &lt;content item="1"/&gt; 4 &lt;content item="2b"/&gt; 5 &lt;/node&gt; 6 &lt;node id="3" /&gt; </code></pre> <p>A standard diff tool is going to highlight lines 2 and 4 as needing to be merged, but even if you automatically add the lines from file2, you'll end up with an invalid xml file:</p> <pre><code>1 &lt;node id="1" /&gt; 2 &lt;node id="2a"&gt; 2 &lt;node id="2b"&gt; 3 &lt;content item="1"/&gt; 4 &lt;content item="2a"/&gt; 4 &lt;content item="2b"/&gt; 5 &lt;/node&gt; 6 &lt;node id="3" /&gt; </code></pre> <p>You really need a diff/merge tool that is xml-aware. I found a description of one called <a href="http://www.javaworld.com/javaworld/jw-07-2007/jw-07-xmlmerge.html" rel="nofollow noreferrer">XmlMerge</a>, along with an example that shows it doing exactly what you're asking for. It's part of <a href="http://sourceforge.net/project/showfiles.php?group_id=147215" rel="nofollow noreferrer">EL4J</a>.</p> <p>There is a dormant effort called <a href="http://www.oreillynet.com/onlamp/blog/2005/04/xupdate_update.html" rel="nofollow noreferrer">XUpdate</a> that has a fair amount of tools around it (both for generating the XUpdate diffs and for applying them). There are also some <a href="http://msdn.microsoft.com/en-us/library/aa302294.aspx" rel="nofollow noreferrer">.net classes</a> that use a different foundation. You will need to do some scripting to use either of these systems I think.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload