Hello,
I have a requirement to compare xml data returned from an api against xml
data saved in file. I am using xmlunit for the same.
Xml data returned from api -
<?xml
version="1.0"?><VEHICLE_LIST><SCREEN_NAME>FE601019</SCREEN_NAME><SCREEN_NAME
>FE601018</SCREEN_NAME><SCREEN_NAME>CD601015</SCREEN_NAME><SCREEN_NAME>CD601
016</SCREEN_NAME><SCREEN_NAME>CA000382</SCREEN_NAME></VEHICLE_LIST>
Xml data from file -
<?xml version="1.0"?>
<VEHICLE_LIST>
<SCREEN_NAME>FE601019</SCREEN_NAME>
<SCREEN_NAME>FE601018</SCREEN_NAME>
<SCREEN_NAME>CD601015</SCREEN_NAME>
<SCREEN_NAME>CD601016</SCREEN_NAME>
<SCREEN_NAME>CA000382</SCREEN_NAME>
</VEHICLE_LIST>
Data from both sources is same except file has extra newline characters
<\n>. These characters are also considered during comparison and hence it
fails.
Any idea as how to bypass new line characters?
One option is to read file and skip all new line characters.
Thanks
Jaydeep
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Ltd. does not accept any liability for virus infected mails.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general