NAME
Test::XML - Compare XML in perl tests
SYNOPSIS
use Test::XML tests => 3;
is_xml_in_order( '<foo /><foo />', '<foo></foo><foo x="a"/>' ); # PASS
is_xml_in_order( '<foo /><bar />', '<bar /><foo />' ); # FAIL
isnt_xml_in_order( '<foo /><bar />', '<bar /><foo />' ); # PASS
DESCRIPTION
This module contains generic XML testing tools. See below for a list of other modules with functions relating to specific XML modules.
FUNCTIONS
- is_xml_in_order ( GOT, EXPECTED [, TESTNAME ] )
-
This function compares GOT and EXPECTED, both of which are strings of XML. The comparison works only on the order of the tags, attributes are ignored.
Returns true or false, depending upon test success.
- isnt_xml_in_order( GOT, MUST_NOT_BE [, TESTNAME ] )
-
This function is similar to is_xml(), except that it will fail if GOT and MUST_NOT_BE are identical.
NOTES
SEE ALSO
AUTHOR
G. Allen Morris III, <gam3 (at) gam3.net>
COPYRIGHT AND LICENSE
Copyright 2006 by G. Allen Morris III
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.