[xml] Compare xml data

Hi all,

I am trying to write a test unit for my application where I have to compare two XML files if they contain the same data.

I first create a test file containing random data, then I process this file using my application (which uses libxml2) and after that is done, I'd like to compare the output.

The problem is, that I sometimes get the compact notation like <node .../> and sometimes <node ...></node>.

Is there a simple way, e.g. using xmllint, to format the data so simply can run a diff on those files?

TIA, Harry


1024D/40F14012 18F3 736A 4080 303C E61E  2E72 7E05 1F6E 40F1 4012

Version: 3.12
GIT/S dx s: a C++ ULS++++$ P+++ L+++$ !E W++ N+ o? K? !w !O !M
V PS+ PE Y? PGP+++ t+ 5-- X+ R+ !tv b++ DI++ D+ G e* h r++ y++

Attachment: pgp4HR_0032dD.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]