このxmlファイルをphpに解析しようとしています。
http://www.san-isidro.net/appmovil/partenieve.xml
問題は、mysqldump で取得したこの xml 形式で解析する方法がわからないことです。
PHPでの解析を手伝ってもらえます<field name="observaciones">
か?
このxmlファイルをphpに解析しようとしています。
http://www.san-isidro.net/appmovil/partenieve.xml
問題は、mysqldump で取得したこの xml 形式で解析する方法がわからないことです。
PHPでの解析を手伝ってもらえます<field name="observaciones">
か?
simplexml_load_file()
PHPのウォークスルーが必要です
あなたのコードは次のようになります
<?php
$xml = simplexml_load_file('http://www.san-isidro.net/appmovil/partenieve.xml');
print_r($xml);
出力:
SimpleXMLElement オブジェクト ( [データベース] => SimpleXMLElement オブジェクト ( [@attributes] => 配列 ( [name] => sanisidro ) [table_structure] => SimpleXMLElement オブジェクト ( [@attributes] => 配列 ( [name] => nuke_partenieve ) [ field] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [Field] => id [Type] => int(10) [Null] => NO [Key] => PRI [デフォルト] => 0 [追加] => [コメント] => ) ) 1 => SimpleXMLElement オブジェクト ( [@attributes] => 配列 ( [フィールド] => 日付 [タイプ] => 日付 [Null] => NO [ Key] => [Default] => 0000-00-00 [Extra] => [Comment] => ) ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [Field] => espesor_max [Type] ] => テキスト [ヌル] => NO [キー] =>......