473,503 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 25 '06 #1
2 1333
bh*************@gmail.com 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
Jul 26 '06 #2
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
Jul 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
322
by: Mike Connor | last post by:
I am having trouble getting Conditional Folder creation & File insertion to work using VS .Net in a Deployment Project for a C# app. I am displaying a generic Textbox Dialog under the User...
13
20558
by: MrCoder | last post by:
Hey guys, my first post on here so I'll just say "Hello everbody!" Ok heres my question for you lot. Is there a faster way to compare 1 byte array to another? This is my current code //...
55
4594
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
16
2178
by: Lyle Fairfield | last post by:
There is an MS-SQL table named Bugs_Comments_and_Suggestions. There is a form named Bugs_Comments_and_Suggestions. To allow John Doe to use this form, we GRANT him LOGIN and ACCESS permissions...
1
1155
by: Solitus | last post by:
I have databinding problem with a repeater <ItemTemplate> <tr> <!-- fixed content --> </tr> <tr> <!-- optional content --> </tr> </ItemTemplate>
4
3149
by: alex.hatzisavas | last post by:
Dear all, I'm trying to do a selective deletion from an 'Archive' table based on dates. Here is the setup: Table 'Archive' has a date field ( ). Another table ('Cutoffs') defines the Low...
1
1363
by: aman909 | last post by:
Hello, I have a stock control system for fabric that is produced. The stock control has contains details of every colour of fabric that is produced. We have about 40 to 50 different colours. Im...
0
1564
by: arindams | last post by:
I've a form where an webrowser contains a html file. I want to copy a selective portion of the html content and paste that content in an excel 2007 file where it will be pasted as a normal text (not...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7008
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...
0
7467
tracyyun
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...
1
5022
isladogs
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...
0
3177
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...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.