XREAでWordPressのインポートが出来ない
parsers.php を開きます。
WordPress Importer classの メンバー関数parse()のif文を以下のように、コメントアウトします。
これで、ワードプレスのインポートが出来ます。
class WXR_Parser {
function parse( $file ) {
// Attempt to use proper XML parsers first
/*ここから if ( extension_loaded( 'simplexml' ) ) {
$parser= new WXR_Parser_SimpleXML;
$result= $parser->parse( $file );
// If SimpleXML succeeds or this is an invalid WXR file then return the results
if ( ! is_wp_error( $result ) | | 'SimpleXML_parse_error' != $result->get_error_code() )
return $result;
} else ここまで */if ( extension_loaded( 'xml' ) ) {
$parser= new WXR_Parser_XML;
$result= $parser->parse( $file );
// If XMLParser succeeds or this is an invalid WXR file then return the results
if ( ! is_wp_error( $result ) | | 'XML_parse_error' != $result->get_error_code() )
return $result;
}
http://memopad.bitter.jp/w3c/php/php_ref_libxml.html(参考)