Posted By

daisuke103 on 04/24/08


Tagged

php parse textmate pear xml php4 unserializer


Versions (?)

PHP XML 解析 XMLシリアライザーphp4


 / Published in: Other
 

  1. // XML解析
  2. require_once'../lib/XML/Unserializer.php';
  3. $xml_filename = "http://192.168.11.29/chopsticks/data/bloger_xml.php";
  4. $xml = join("",file($xml_filename)); // xml_str にファイルを読み込み
  5.  
  6. $Unserializer =& new XML_Unserializer();
  7. $Unserializer->setOption('parseAttributes', TRUE);
  8. $status = $Unserializer->unserialize($xml);
  9. if (PEAR::isError($status)) {
  10. die($status->getMessage());
  11. }
  12. print_r($Unserializer->getUnserializedData());

Report this snippet  

You need to login to post a comment.