Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > XML diff

Reply
Thread Tools

XML diff

 
 
cdvr
Guest
Posts: n/a
 
      06-24-2007
I have to find or write some code to perfrom a diff between two XML
files. In particular they will most likely be RSS feeds, where the
first time viewing a feed I'd get the whole RSS XML, but on additional
viewings of a the same feed I would only get/store the difference from
the first time.

Anyways, I have found a few samples that do a diff on XML files (or
just any text file)....but they only display the lines that change,
they don't say what part of a line has changed. Just curious if
anyone has a solution or knows of any before I work on re-creating the
wheel

thanks

 
Reply With Quote
 
 
 
 
Sideswipe
Guest
Posts: n/a
 
      07-11-2007
I ran into this exact situation before. I was trying to create a test
case for validating an XML Serialization engine. Problems to consider:
Is Tag order important to "equality"? If it is, then the tag's have to
be ordered and you have to define the ordering on them. You should
still sort them to make defining equality simpler. Oh, and don't
forget the numerous subelements to invoke "equality" on as it defines
your own.

It can be done, but I haven't found an automated way to compare them
in a "smart" way like this.

Christian Bongiorno
http://christian.bongiorno.org

On Jun 24, 2:34 pm, cdvr <codecr...@gmail.com> wrote:
> I have to find or write some code to perfrom a diff between two XML
> files. In particular they will most likely be RSS feeds, where the
> first time viewing a feed I'd get the whole RSS XML, but on additional
> viewings of a the same feed I would only get/store the difference from
> the first time.
>
> Anyways, I have found a few samples that do a diff on XML files (or
> just any text file)....but they only display the lines that change,
> they don't say what part of a line has changed. Just curious if
> anyone has a solution or knows of any before I work on re-creating the
> wheel
>
> thanks



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff CSS styles for diff INPUT TYPE='s? A Traveler ASP .Net 6 08-31-2004 09:17 PM
[ANN] Diff::LCS 1.1.0, Diff::LCS 1.0.4 Austin Ziegler Ruby 3 08-09-2004 06:34 AM
diff Process under diff users Cyril Vi?ville Perl 1 06-29-2004 06:22 PM
Same sessionID retuned to diff browsers in diff machines Berrucho ASP .Net 2 12-05-2003 02:23 PM
How to sort a XML file itself or how to compare two XML files whith pretty printed diff. edw XML 2 07-09-2003 09:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57