Я не могу разобрать XML-документ. хорошо моя задача состояла в том, как этотне удается разобрать данные xml
я получил XML-страницу с завитком, которые содержат IP-данные
<ip_address>209.59.194.20</ip_address><ip_type>Mapped</ip_type><Network><organization>thoughtconvergence.com</organization><carrier>whidbey internet services</carrier><asn>6295</asn><connection_type/><line_speed/><ip_routing_type>fixed</ip_routing_type><Domain><tld>com</tld><sld>trafficz</sld></Domain></Network><Location><continent>north america</continent><latitude>34.03708</latitude><longitude>-118.42789</longitude><CountryData><country>united states</country><country_code>us</country_code><country_cf>99</country_cf></CountryData><region>southwest</region><StateData><state>california</state><state_code>ca</state_code><state_cf>80</state_cf></StateData><dma>803</dma><msa>31100</msa><CityData><city>los angeles</city><postal_code>90064</postal_code><time_zone>-8</time_zone><area_code>323</area_code><city_cf>61</city_cf></CityData></Location></ipinfo>
я пытаюсь разобрать его
$book = simplexml_load_string($datax);
$ipadd = $book->ip_address;
$ipatype = $book->ip_type;
$ip_routing_type = $book->Network->ip_routing_type;
$state = $book->Location->StateData->state;
$country = $book->Location->CountryData->country;
$continent = $book->Location->continent;
$region = $book->Location->region;
Теперь я получаю несколько ошибок 1) Entity: строка 2: ошибка парсера: дополнительный контент в конце документа 2 Попытка получить свойство не объекта в строке #
спасибо ..... мелкие вещи, которые мы забываем когда-то, и создают неприятности: D – user114500