You are here

public static function WordPressBlog::readString in WordPress Migrate 7.2

With earlier versions of libxml, XMLReader has no readString() method - mock it up if necessary.

Parameters

$reader: XMLReader instance being iterated for XML parsing.

Return value

string

2 calls to WordPressBlog::readString()
WordPressBlog::__construct in ./wordpress.inc
WordPressCommentXMLReader::next in ./wordpress_comment.inc
Implementation of Iterator::next(). We need to preserve the ID of the parent element.

File

./wordpress.inc, line 571
Implementation of migration from WordPress into Drupal

Class

WordPressBlog

Code

public static function readString(XMLReader $reader) {
  if (method_exists('XMLReader', 'readString')) {
    return $reader
      ->readString();
  }
  else {
    $node = $reader
      ->expand();
    return $node->textContent;
  }
}