Jump to content

Help with simplexml_load_file


mikaint

Recommended Posts

I'm using simplexml_load_file for handling a third party xml.... this usually works fine, but sometimes, for a reason i'm unable to discover, i'm getting some warnings and the script can't handle the data...

WARNINGS:

Warning: simplexml_load_file(): input conversion failed due to input error, bytes 0x9A 0x6B 0x6F 0x76
Warning: simplexml_load_file(): encoder error
parser error : Premature end of data in tag match

 

PART OF XML CODE

<?xml version="1.0" encoding="windows-1253"?>
<coupon couponTitle="23/7/2009">
<description>whatever</description>
<match  date="23/7/2009" time="01:30" homeTeam="Flamengo RJ" awayTeam="Barueri SP" championShip="Brazil - Serie A Brasileiro">
<status>4</status>
<score>1-1</score>
<halftime>0-0</halftime>
<min>FIN</MIN>
<info>"(goal) Baiano (pen) 53' | (goal) Emerson 69' | "</info>
<goalnow>""</goalnow>
<result>"X"</result>
......
</match>

XML is using windows-1253, and probably that's the problem (just a guess), however this only happens a few times. Most of the time there's no problem. What could be the problem?

Link to comment
https://forums.phpfreaks.com/topic/167345-help-with-simplexml_load_file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.