$content = $this->elem->getElementsByTagName("content")->item(0);
if ($content) {
- if ($content->hasChildNodes()) {
-
- if ($content->getElementsByTagName("*")->length > 1) {
+ if ($content->hasAttribute('type')) {
+ if ($content->getAttribute('type') == 'xhtml') {
return $this->doc->saveXML($content->firstChild->nextSibling);
}
}
}
function get_description() {
- $summary = $this->elem->getElementsByTagName("summary")->item(0);
+ $content = $this->elem->getElementsByTagName("summary")->item(0);
+
+ if ($content) {
+ if ($content->hasAttribute('type')) {
+ if ($content->getAttribute('type') == 'xhtml') {
+ return $this->doc->saveXML($content->firstChild->nextSibling);
+ }
+ }
- if ($summary) {
- return $summary->nodeValue;
+ return $content->nodeValue;
}
+
}
function get_categories() {