Extracts the text contained by the XHTML element.
SimpleXMLElement $element: Element to extract text from.
string Extracted text.
protected function asText(SimpleXMLElement $element) {
if (!is_object($element)) {
return $this
->fail('The element is not an element.');
}
return trim(html_entity_decode(strip_tags($element
->asXML())));
}