Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Selective XML compare

Reply
Thread Tools

Selective XML compare

 
 
bhushan.kharabe@gmail.com
Guest
Posts: n/a
 
      07-25-2006
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

 
Reply With Quote
 
 
 
 
Joe Kesselman
Guest
Posts: n/a
 
      07-26-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?R=E9mi_Peyronnet?=
Guest
Posts: n/a
 
      07-26-2006
Hi,

> 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
 
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
Selective XML filtering Ben XML 3 09-03-2007 02:36 PM
Selective File Sharing permissions on small workgroup. =?Utf-8?B?SlAgQXBvbGxv?= Wireless Networking 2 10-11-2005 12:30 PM
XSL to flatten selective node in XML Doc delgados129 XML 2 04-16-2005 04:21 PM
Selective delete of auto complete list in Firefox? Jim Firefox 2 03-06-2005 07:38 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