توزيع XML خطأ: جهاز أو PUBLIC، وURI مفقود [مغلقة]

StackOverflow https://stackoverflow.com/questions/154310

  •  03-07-2019
  •  | 
  •  

سؤال

وأنا تحليل تغذية RSS من URL التالي:

http://rss.sciam.com/ScientificAmerican-Global؟format=xml

// $xml_text is filled with the contents read from the URL
$xml_parser = xml_parser_create();
$res = xml_parse($xml_parser, $xml_text);

if (!$res) {
  $error =
    xml_error_string(xml_get_error_code($xml_parser)).
    " at line ".
    xml_get_current_line_number($xml_parser);
}

// $error contains: "SYSTEM or PUBLIC, the URI is missing at line 1"

FeedValidator.org يقول هذا هو تغذية جيدة.

وكيف يمكنني الحصول على محلل XML PHP لتغلب على هذا الخطأ؟

تعديل : في أنها تبدو كما هي إعادة توجيه هذه الأعلاف إلى موقع آخر على أساس عامل المستخدم. بلدي PHP النصي هو عدم الحصول على التغذية الصحيحة.

هل كانت مفيدة؟

المحلول

والرمز يعمل بالنسبة لي، يجب الحصول على نص الخطأ.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top