Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
正在尝试解析XMLDiffAndPatch创建的diffGram_Xml_Diff_Patch - Fatal编程技术网

正在尝试解析XMLDiffAndPatch创建的diffGram

正在尝试解析XMLDiffAndPatch创建的diffGram,xml,diff,patch,Xml,Diff,Patch,我使用“XML差异和补丁”dll来比较两个XML。 有没有简单的方法可以将DiffGram解析成用户容易理解的数据? 例如,我需要这个DiffGram: <?xml version="1.0" encoding="utf-16" ?> <xd:xmldiff version="1.0" srcDocHash="2079810781567709607" options="IgnoreChildOrder IgnoreNamespaces IgnorePrefixes" xm

我使用“XML差异和补丁”dll来比较两个XML。 有没有简单的方法可以将DiffGram解析成用户容易理解的数据? 例如,我需要这个DiffGram:

<?xml version="1.0" encoding="utf-16" ?> 
<xd:xmldiff version="1.0" srcDocHash="2079810781567709607" 
options="IgnoreChildOrder IgnoreNamespaces IgnorePrefixes" 
xmlns:xd="http://schemas.microsoft.com/xmltools/2002/xmldiff">
   <xd:node match="1">
      <xd:add type="1" name="Subaru" ns="http://www.Subaru.com" prefix="ns2">
         <xd:add type="2" name="model">Impreza</xd:add> 
            <xd:add>
               <ns2:Muffler xmlns:ns2="http://www.Subaru.com">450</ns2:Muffler> 
               <ns2:Bumper xmlns:ns2="http://www.Subaru.com">120</ns2:Bumper> 
               <ns2:Floormat xmlns:ns2="http://www.Subaru.com">65</ns2:Floormat> 
            </xd:add>
         <xd:add match="/1/2/4" opid="1" /> 
      </xd:add>
      <xd:node match="2">
         <xd:node match="1">
            <xd:change match="1">600</xd:change> 
         </xd:node>
         <xd:add>
            <ns2:WindShieldWipers xmlns:ns2="http://www.Subaru.com">25</ns2:WindShieldWipers>
         </xd:add>
         <xd:remove match="4" opid="1" /> 
      </xd:node>
   </xd:node>
   <xd:descriptor opid="1" type="move" /> 
</xd:xmldiff> 

Impreza
450
120
65
600
25
翻译成易于理解的步骤,供用户遵循。(例如:在路径1->12->25中添加“值”)


谢谢,Hadar使用xmldiffpatch视图类或用于html比较。

使用xmldiffpatch视图类或用于html比较