API should be identical to \Dxw\Assertions\HTML. Ideally we should convert both documents to [Canonical XML](https://www.w3.org/TR/xml-c14n). Here's a bit of code we used on another project: ``` protected function assertXMLEquals($expected, $actual) { call_user_func_array( [$this, 'assertEquals'], array_map( function ($x) { $d = new DOMDocument; $d->loadXML($x); $t = $d->C14N(); $t = preg_replace('/^\s+/m', '', $t); $t = preg_replace('/\n/', '', $t); $t = preg_replace('/></', ">\n<", $t); return $t; }, [$expected, $actual] ) ); } ```
API should be identical to \Dxw\Assertions\HTML.
Ideally we should convert both documents to Canonical XML.
Here's a bit of code we used on another project: