}
void assertEquals(DOMDocument* expectedDOM, XMLObject* xmlObject, bool canMarshall=true) {
- assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, xmlObject, canMarshall);
+ xmlObject->releaseThisAndChildrenDOM();
+ auto_ptr<XMLObject> cloned(xmlObject->clone());
+ assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, cloned.get(), canMarshall);
delete xmlObject;
}