2014-04-12 01:23:20 +00:00
|
|
|
#ifndef MPD_TEST_XML_COMPARE_H_
|
|
|
|
#define MPD_TEST_XML_COMPARE_H_
|
|
|
|
|
2014-08-28 18:35:15 +00:00
|
|
|
#include <libxml/tree.h>
|
2014-04-12 01:23:20 +00:00
|
|
|
|
2014-08-28 18:35:15 +00:00
|
|
|
#include <string>
|
2014-04-12 01:23:20 +00:00
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace edash_packager {
|
2014-04-12 01:23:20 +00:00
|
|
|
|
|
|
|
/// Checks whether the XMLs are equivalent. An XML schema can specify strict
|
|
|
|
/// ordering of children and MPD does. These functions are currently tuned to
|
|
|
|
/// compare subsets of MPD. Therefore this function requires strict ordering of
|
|
|
|
/// the child elements of an element. Attributes can be in any order since XML
|
|
|
|
/// cannot enforce ordering of attributes.
|
|
|
|
/// @param xml1 is compared against @a xml2.
|
|
|
|
/// @param xml2 is compared against @a xml1.
|
|
|
|
/// @return true if @a xml1 and @a xml2 are equivalent, false otherwise.
|
|
|
|
bool XmlEqual(const std::string& xml1, const std::string& xml2);
|
|
|
|
bool XmlEqual(const std::string& xml1, xmlDocPtr xml2);
|
|
|
|
bool XmlEqual(xmlDocPtr xml1, xmlDocPtr xml2);
|
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
} // namespace edash_packager
|
2014-04-12 01:23:20 +00:00
|
|
|
|
|
|
|
#endif // MPD_TEST_XML_COMPARE_H_
|