Replaced improper DOMDocument call.