Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 25th, 2006, 09:55 PM
bhushan.kharabe@gmail.com
Guest
 
Posts: n/a
Default Selective XML compare

I need to compare the test results from different releases saved in
xml. Some differences are inconsequential like computer name where test
ran or date and time of test. But other info is usefull. my schema
looks like

<TestCase id='a1'>
<Computer>C1</Computer>
<Executed>07/25/06</Executed>
<input>i1,12</input>
<output>o1,o2</output>
<result>pass/fail</result>
</TestCase>

Anybody know any library I can use to compare only the usefull elements
of test case and ignore other info.

Thanks for help in advance

Bhushan

  #2  
Old July 26th, 2006, 04:15 AM
Joe Kesselman
Guest
 
Posts: n/a
Default Re: Selective XML compare

bhushan.kharabe@gmail.com wrote:
Quote:
Anybody know any library I can use to compare only the usefull elements
of test case and ignore other info.
Since only you know what is "useful" and what isn't, I'd suggest you
write an XSLT stylesheet to extract only the meaningful data, then
compare that. You may want to put the extracted information through an
XML canonicalizer as well, since some differences really aren't
meaningful to XML itself.


--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
  #3  
Old July 26th, 2006, 06:46 PM
Rémi Peyronnet
Guest
 
Posts: n/a
Default Re: Selective XML compare

Hi,
Quote:
Anybody know any library I can use to compare only the usefull elements
of test case and ignore other info.
libxmldiff / xmlTreeNav can do it :

Ex : xmldiff diff --ignore "Computer,Executed" --ids "@id" one.xml
two.xml result.xml

The result.xml will contain a merge of the files, annotated with a
diff:status attribute describing if the element has been added, removed,
modified,... (and you will keep non-relevant information for further
analysis)

http://people.via.ecp.fr/~remi/soft/...mldiff_en.php3
http://people.via.ecp.fr/~remi/soft/...reenav_en.php3

Hope this helps

--
Rémi Peyronnet
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles