Thanks to this newsgroup I've been pointed to Microsoft's XML Diff & Patch
utilities. I've been reading about how I can use the tools to generate a
diffgram between two XML documents, and how the XML Patch utility can (for
example) bring document A in line with document B. Very cool.
However, I was wondering if there's any way I can use the diffgram to
generate something else; a third type of document that highlights the
differences between the the input docs and is a little more readable than a
diffgram would be ideal. Where I can see actual node names instead of node
match numbers, for instance.
Even if I could get a document that shows what XML Patch would do; the new
nodes added, or nodes deleted, or values changed, I'd be happy. The XML
patch demo site at http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx
has a nice colored comparison between the two files, and would be terrific
for my purposes, but I can't find any source code on how they did it.
Has anyone done something like this before? I'm open to suggestions.
Thanks! 7 21912
Steve Hershoff wrote:
Even if I could get a document that shows what XML Patch would do; the new
nodes added, or nodes deleted, or values changed, I'd be happy. The XML
patch demo site at http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx
has a nice colored comparison between the two files, and would be terrific
for my purposes, but I can't find any source code on how they did it.
http://msdn.microsoft.com/library/de...ml/xmldiff.asp
explains using the DiffPatch tool and has a link to download Xmldiffpatch.ex e which contains the source.
Note that there are a few bugs (as posted in the discussion forums). You can also download my ComXT tool from http://www.gotdotnet.com/Community/U...D-48A81BE0298F
for an example of using the XmlDiffPatch DLLs (and contains my modified XmlDiffPatch DLLs which correct a couple of the bugs).
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)
This looks great, Ken. Many thanks.
As an aside, I'm wondering if it's possible for me to tweak things, so that
two XML files are "different" only if they have extra or missing nodes.
As an example, if two documents had two nodes at the same point in their
trees that looked like this:
document 1:
<add key="Contact" value="jo*@mysp ace.com"/>
document 2:
<add key="Contact" value="da***@cr aigslist.org"/>
.....I'd like to consider them as not different.
.. I'm more interested in the structure, not value content, of the files.
I've browsed the source code for XML diff and it's a little daunting, so I
was wondering if anyone knew which sections I might zero in on to accomplish
this, if it's possible. Thanks again.
"Ken Arway" <ka****@jaguar. att.netwrote in message
news:uI******** ******@TK2MSFTN GP03.phx.gbl...
Steve Hershoff wrote:
>Even if I could get a document that shows what XML Patch would do; the new nodes added, or nodes deleted, or values changed, I'd be happy. The XML patch demo site at http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx has a nice colored comparison between the two files, and would be terrific for my purposes, but I can't find any source code on how they did it.
http://msdn.microsoft.com/library/de...ml/xmldiff.asp
explains using the DiffPatch tool and has a link to download
Xmldiffpatch.ex e which contains the source.
Note that there are a few bugs (as posted in the discussion forums). You
can also download my ComXT tool from http://www.gotdotnet.com/Community/U...D-48A81BE0298F
for an example of using the XmlDiffPatch DLLs (and contains my modified
XmlDiffPatch DLLs which correct a couple of the bugs).
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)
Steve,
If you are intertested in the structure only, then should you not use the
XML DIff tool to compare the XSD of the XML and not the XML data itself?.
"Steve Hershoff" wrote:
This looks great, Ken. Many thanks.
As an aside, I'm wondering if it's possible for me to tweak things, so that
two XML files are "different" only if they have extra or missing nodes.
As an example, if two documents had two nodes at the same point in their
trees that looked like this:
document 1:
<add key="Contact" value="jo*@mysp ace.com"/>
document 2:
<add key="Contact" value="da***@cr aigslist.org"/>
.....I'd like to consider them as not different.
.. I'm more interested in the structure, not value content, of the files.
I've browsed the source code for XML diff and it's a little daunting, so I
was wondering if anyone knew which sections I might zero in on to accomplish
this, if it's possible. Thanks again.
"Ken Arway" <ka****@jaguar. att.netwrote in message
news:uI******** ******@TK2MSFTN GP03.phx.gbl...
Steve Hershoff wrote:
Even if I could get a document that shows what XML Patch would do; the
new nodes added, or nodes deleted, or values changed, I'd be happy. The
XML patch demo site at http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx has a nice
colored comparison between the two files, and would be terrific for my
purposes, but I can't find any source code on how they did it.
http://msdn.microsoft.com/library/de...ml/xmldiff.asp
explains using the DiffPatch tool and has a link to download
Xmldiffpatch.ex e which contains the source.
Note that there are a few bugs (as posted in the discussion forums). You
can also download my ComXT tool from http://www.gotdotnet.com/Community/U...D-48A81BE0298F
for an example of using the XmlDiffPatch DLLs (and contains my modified
XmlDiffPatch DLLs which correct a couple of the bugs).
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)
Hi Ganesh,
Does the XML Diff tool output an XSD? I thought it only created a DiffGram.
"Ganesh Muthuvelu" <Ga************ *@discussions.m icrosoft.comwro te in
message news:22******** *************** ***********@mic rosoft.com...
Steve,
If you are intertested in the structure only, then should you not use the
XML DIff tool to compare the XSD of the XML and not the XML data itself?.
Hi Ken,
I am also interested in similar tool but as I understand that XML
diff/patch tool does the diff/patching automatically. But I would like to
give this decision to the end user to decide which node out of the 2 XML
file they want to select in the merged XML file, just like clearcase
xmldiffmrg.exe tool for merging XML files. Do you think it can be possible
to tailored XML diff/patch tool to do this job?
Regards
Sanjib
"Ken Arway" <ka****@jaguar. att.netwrote in message
news:uI******** ******@TK2MSFTN GP03.phx.gbl...
Steve Hershoff wrote:
>Even if I could get a document that shows what XML Patch would do; the new nodes added, or nodes deleted, or values changed, I'd be happy. The XML patch demo site at http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx has a nice colored comparison between the two files, and would be terrific for my purposes, but I can't find any source code on how they did it.
http://msdn.microsoft.com/library/de...ml/xmldiff.asp
explains using the DiffPatch tool and has a link to download
Xmldiffpatch.ex e which contains the source.
Note that there are a few bugs (as posted in the discussion forums). You
can also download my ComXT tool from http://www.gotdotnet.com/Community/U...D-48A81BE0298F
for an example of using the XmlDiffPatch DLLs (and contains my modified
XmlDiffPatch DLLs which correct a couple of the bugs).
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)
Sanjib Biswas wrote:
I am also interested in similar tool but as I understand that XML
diff/patch tool does the diff/patching automatically. But I would like to
give this decision to the end user to decide which node out of the 2 XML
file they want to select in the merged XML file, just like clearcase
xmldiffmrg.exe tool for merging XML files. Do you think it can be possible
to tailored XML diff/patch tool to do this job?
I doubt that can be done, but the best place to ask the question is in the Extreme XML Column Discussions on GotDotNet: http://www.gotdotnet.com/community/m...rd.aspx?id=207
--
Take care,
Ken
(to reply directly, remove the cool car. <sigh>)
Hi,
I am working on a functionality wherein the user can approve of reject
the changes made to an xml file (say, old.xml)and create a new xml file
(new.xml) with all the approved changes.
The only difference between my application and the xml diff/patch
application is that the diff/patch utility consideres all changes to be
approved and creates the new.xml. I would like to add one layer in
between and give the user the ability to approve or reject. Any ideas
in this regard will be very much appriciated.
Thanks
Naveen
*** Sent via Developersdex http://www.developersdex.com *** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Charley |
last post by:
I've got a diff file that I think is a patch for a bunch of file in a
directory. How do I apply this file?
I thought it was
#patch myfile.diff
But that does nothing. I must be missing something. The diff file
contains diff's for a nuch of files, not just a single file. Do I need a
|
by: Nick Allen |
last post by:
After using ndiff from difflib, the function restore
would return the sequence that generated the delta. Unfortunately,
restore does not do the same for unified_diff. I do not see any similar
function that is intended for unified_diff. Does anyone know how to
"restore" from a unified diff generated delta?
Thanks for all your help in advance.
Best Regards,
Nick
|
by: TonyHa |
last post by:
Hello,
Does any one have using Python to write a Unix "diff" command for
Window?
Tony Ha.
|
by: Ching-Lung |
last post by:
Hi all,
I try to create a tool to check the delta (diff) of 2
binaries and create the delta binary. I use binary
formatter (serialization) to create the delta binary. It
works fine but the delta binary is pretty huge in size. I
have 1 byte file and 2 bytes file, the delta should be 1
byte but somehow it turns out to be 249 bytes using binary
formatter. I guess serialization has some other things
added to the delta file.
|
by: Andreas Kasparek |
last post by:
Hola!
I'm preparing my master thesis about a XML Merge Tool implementation and was
wondering if there is any open standard for XML diff regarding topics like:
- is a diff result computed on the ordered or unordered xml node tree of
the compared documents?
- what identifiers/criteria should be used by default to match elements of
the same type in different documents?
- should a diff tool consider move operations or only insert/delete
| |
by: Csaba Gabor |
last post by:
I'm comparing the text of (snippets of) web pages which I expect to be
quite different or quite similar. In the case where they are similar,
I would like to display the more recent one and say something like:
Word 2 added : "Jack be nimble"
Words 10-11 changed to: "the quick brown fox"
: "the brown fast quick fox"
Words before word 20 removed: "sat in a corner on"
|
by: KJ |
last post by:
Helo All,
Does anyone out there have any example XSLT files (that they'd like to
share) which transform difgrams produced by the Xml Diff and Patch
tool into a nice format?
This would be most appreciated.
-Thanks,
KJ
|
by: erikcw |
last post by:
Hi,
I'm trying to create an undo/redo feature for a webapp I'm working on
(django based). I'd like to have an undo/redo function.
My first thought was to use the difflib to generate a diff to serve as
the "backup", and then if someone wants to undo their operation, the
diff could just be merged/patched with the current text.
However, I've not be able to find a patch library. Are there any
|
by: Aaron Gray |
last post by:
Hi,
I am working on an HTML WYSISYG Wiki and need to display a diff page like
WikiPedia does if two people edit a file at the same time to give the second
user the diff. Basically with additions in red and deletions in red strike
though.
There seem to be several in Perl and Python and many diff programs which all
seem to be line based and work on text written in PHP.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |