You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Christopher Ebert <ce...@pocketthis.com> on 2002/08/05 20:56:49 UTC

RE: XML Difference API

	Hi,

	I don't know of an API -- I would suggest using a formatter and comparing text files. Use system calls if you have to do it from Java -- it will be much easier to get diff-like output if you just use diff :). I know that XML Spy will format XML if you write it out; there must be a command-line formatter either as part of the XML Spy suite or somewhere.

	Good luck,

	Chris


-----Original Message-----
From: Suresh Babu Koya [mailto:skoya@quark.co.in]
Sent: Sunday, July 28, 2002 11:37 PM
To: xerces-j-user@xml.apache.org
Subject: XML Difference API


Greetings all,

   Is there any API/libraries for differencing XML files with/without
whitespaces. 

I just need some API that could let me know 
1. Any differences between XML files in Diff format(Unix diff command).    
2. A boolean(true) if there are no differences and XML files are identical.

--Suresh




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: XML Difference API

Posted by Mike McKay <mv...@decisionsoft.com>.
The DecisionSoft xmldiff tool should fulfill your requirements. There is 
an option for standard diff output, along with colored output, html 
output etc. You will also need to download xmlpp, an xml pretty printer. 
Both are available (with source) for free from here:

http://software.decisionsoft.com/tools.html

For a quick demo you can try out the web version:

http://tools.decisionsoft.com/xmldiff.html

Enjoy

Mike



Paul Libbrecht wrote:
> I think I know there is an xmldiff tool somewhere. That can be useful.
> 
> I would be interested by your results as well. In particular, I'd be 
> interested to notions of patches similar to XUpdate.
> 
> As of formatters, I think the sample called SAXWriter (used to be in 
> Xerces 1.4) performs exactly this.
> 
> Paul
> 
> On Lundi, août 5, 2002, at 08:56 , Christopher Ebert wrote:
> 
>>
>>     Hi,
>>
>>     I don't know of an API -- I would suggest using a formatter and 
>> comparing text files. Use system calls if you have to do it from Java 
>> -- it will be much easier to get diff-like output if you just use diff 
>> :). I know that XML Spy will format XML if you write it out; there 
>> must be a command-line formatter either as part of the XML Spy suite 
>> or somewhere.
>>
>>     Good luck,
>>
>>     Chris
>>
>>
>> -----Original Message-----
>> From: Suresh Babu Koya [mailto:skoya@quark.co.in]
>> Sent: Sunday, July 28, 2002 11:37 PM
>> To: xerces-j-user@xml.apache.org
>> Subject: XML Difference API
>>
>>
>> Greetings all,
>>
>>    Is there any API/libraries for differencing XML files with/without
>> whitespaces.
>>
>> I just need some API that could let me know
>> 1. Any differences between XML files in Diff format(Unix diff command).
>> 2. A boolean(true) if there are no differences and XML files are 
>> identical.
>>
>> --Suresh
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 
> 


-- 
Michael McKay, Client Services        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: XML Difference API

Posted by Gottfried Szing <go...@szing.at>.
On Mon, 2002-08-05 at 21:35, Paul Libbrecht wrote:

> I think I know there is an xmldiff tool somewhere. That can be useful.

we are using 

http://sourceforge.net/projects/xmlunit/

for comparing xmls. maybe this also helps.

cu


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: XML Difference API

Posted by Paul Libbrecht <pa...@activemath.org>.
I think I know there is an xmldiff tool somewhere. That can be useful.

I would be interested by your results as well. In particular, I'd be 
interested to notions of patches similar to XUpdate.

As of formatters, I think the sample called SAXWriter (used to be in 
Xerces 1.4) performs exactly this.

Paul

On Lundi, août 5, 2002, at 08:56 , Christopher Ebert wrote:

>
> 	Hi,
>
> 	I don't know of an API -- I would suggest using a formatter and 
> comparing text files. Use system calls if you have to do it from 
> Java -- it will be much easier to get diff-like output if you just use 
> diff :). I know that XML Spy will format XML if you write it out; there 
> must be a command-line formatter either as part of the XML Spy suite or 
> somewhere.
>
> 	Good luck,
>
> 	Chris
>
>
> -----Original Message-----
> From: Suresh Babu Koya [mailto:skoya@quark.co.in]
> Sent: Sunday, July 28, 2002 11:37 PM
> To: xerces-j-user@xml.apache.org
> Subject: XML Difference API
>
>
> Greetings all,
>
>    Is there any API/libraries for differencing XML files with/without
> whitespaces.
>
> I just need some API that could let me know
> 1. Any differences between XML files in Diff format(Unix diff command).
> 2. A boolean(true) if there are no differences and XML files are 
> identical.
>
> --Suresh
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org