我试图读取一个xml文件,它是:
<?xml version="1.0" encoding="UTF-8"?>
<!-- UNCLASSIFIED -->
<!-- Built from ANZLIC MET Template ISO 19139 2009-02-18 -->
-<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd http://www.opengis.net/gml http://www.isotc211.org/2005/gml/gml.xsd http://www.w3.org/1999/xlink http://www.isotc211.org/2005/xlink/xlinks.xsd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd">
<!--METValidation=False-->
-<gmd:fileIdentifier> <gco:CharacterString>D09C1546-5CB8-49AE-B717-E74FF3499F57</gco:CharacterString> </gmd:fileIdentifier>
...
...
...
我用过 $xml = simplexml_load_file($_FILES["file"]["tmp_name"]);
,但我对命名空间和冒号有问题!
有人可以帮助我如何阅读这个 XML 吗?!
干杯,阿拉什