xmldiff补丁 [英] xmldiff patch
问题描述
我正在使用xmldiff补丁来比较两个xml文件差异,但是我得到的输出 有节点号,并且很难解码大xml文件。那么如何获取节点名称和差异而不是节点号?
请帮助..
您好Kuntalbabu,
谢谢你在这里发布。
对于您的问题,您可以从MSDN文档下载源文件。 Microsoft提供了一个简单的例子来区分它。
https://msdn.microsoft.com/en-us/library/aa302295.aspx?f=255&MSPPError=-2147217396
基于我测试,更改下面的代码将使.exe运行良好。
Browse.cs
更改:
< pre class ="prettyprint"> private void Browser_Load(object sender,System.EventArgs e)
{
hc.Size = this.Size;
string currPath = AppDomain.CurrentDomain.BaseDirectory;
hc.Navigate(" file:///" + currPath + navigateTo);
hc.Show();
}to:
private void Browser_Load(object sender,System.EventArgs e)
{
hc.Size = this.Size;
hc.Navigate(" file:///" + navigateTo);
hc.Show();
}以下是我用来获取差异的xml文件。
file1.xml
< Car>
< Name>金牛座< /名称>
< Color>白色< /颜色>
< / Car>file2.xml
< Car>
< Name>金牛座< /名称>
< Color1> White1< / Color1>
< / Car>
最好的问候,
Wendy
I am using xmldiff patch for comparing two xml file differences but the output which i am getting has node numbers and which is very difficult to decode for big xml file.So how to get the node names and the differences instead of nodes number?
Please help..
Hi Kuntalbabu,
Thank you for posting here.
For your question, you could download the source file from the MSDN document. Microsoft provide a simple example to get the difference.
https://msdn.microsoft.com/en-us/library/aa302295.aspx?f=255&MSPPError=-2147217396
Based on my test, change the code below will make the .exe works well.
Browse.cs
change:
private void Browser_Load(object sender, System.EventArgs e) { hc.Size = this.Size; string currPath = AppDomain.CurrentDomain.BaseDirectory ; hc.Navigate( "file:///" + currPath + navigateTo ); hc.Show(); }to:
private void Browser_Load(object sender, System.EventArgs e) { hc.Size = this.Size; hc.Navigate( "file:///" + navigateTo ); hc.Show(); }Here are the xml files which I use to get the difference.
file1.xml
<Car> <Name> Taurus </Name> <Color> White </Color> </Car>file2.xml
<Car> <Name> Taurus </Name> <Color1> White1 </Color1> </Car>
Best Regards,
Wendy
这篇关于xmldiff补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!