Error thrown

Call to undefined method DOMText::setAttribute()