nz.ontv.cc xml parser errors?

Subscribe to nz.ontv.cc xml parser errors? 5 post(s), 2 voice(s)

 
Avatar scaryfish 3 post(s)

Hi,

I just found a source of XML TV data for New Zealand (http://nz.ontv.uni.cc/ and click the XML button down the bottom). I have set up eep to use xmltv data and it seems to mostly work except that it doesn’t actually show any program data. Also the channels are weird, with multiples and missing ones. When I do curl http://data.titantv.com/dataservice.asmx/Reques… I get the data but with a lot of parser errors at the top:

<?xml version=”1.0” encoding=”utf-8”?>
<stationcollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.titantv.com/services/dataservice"> <errorcode>0</errorcode> <errordescription>OK</errordescription>


Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:3: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="3" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:7: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="One" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:11: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="SKY Movies 2" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:14: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="SKY Sport 1" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:17: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="SKY 1" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:20: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="2" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:24: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="C4" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:28: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="Prime" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:32: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="SKY Sport 2" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: cache/xmltv-A_00001.xml:35: parser warning : xmlns: URI xmltv is not absolute in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: <channel id="Juice TV" xmlns="xmltv"> in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323



Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /Library/WebServer/Documents/eyetv-epg-proxy/dataservice.asmx/functions-xmltv.inc.php on line 323
<stationcount>10</stationcount> <usingcacheddata></usingcacheddata> <stations> <station> <station_id>1</station_id> <call_sign>SKY Movies 2</call_sign> <rf_channel>3</rf_channel> </station> <station> <station_id>2</station_id> <call_sign>2</call_sign> <rf_channel>2</rf_channel> </station> <station> <station_id>3</station_id> <call_sign>SKY Movies 2</call_sign> <rf_channel>3</rf_channel> </station> <station> <station_id>4</station_id> <call_sign>SKY Sport 1</call_sign> <rf_channel>4</rf_channel> </station> <station> <station_id>5</station_id> <call_sign>SKY 1</call_sign> <rf_channel>5</rf_channel> </station> <station> <station_id>6</station_id> <call_sign>2</call_sign> <rf_channel>2</rf_channel> </station> <station> <station_id>7</station_id> <call_sign>C4</call_sign> <rf_channel>7</rf_channel> </station> <station> <station_id>8</station_id> <call_sign>Prime</call_sign> <rf_channel>8</rf_channel> </station> <station> <station_id>9</station_id> <call_sign>SKY Sport 2</call_sign> <rf_channel>9</rf_channel> </station> <station> <station_id>10</station_id> <call_sign>Juice TV</call_sign> <rf_channel>10</rf_channel> </station> </stations>
</stationcollection>

 
Avatar Guillaume Bo... Administrator 203 post(s)

That XMLTV data is invalid XML.

The channel tags found in the XML should not contain this: xmlns=”xmltv”
(The reason being that the xmlns attribute should contain a complete URL, not just a random string like “xmltv”, and also that parsers expect all XMLTV tags to have the same xmlns, so if the channel tags have a different xmlns, they’ll be confused.)

You should tell the webmaster of that website to remove those. Or you can remove them manually (or automatically, if you know your way around shell scripting or AppleScript). If should then import fine in EEP. (Make sure to disable the cache, or wipe the content of the cache folder when you try to fix this.)

 
Avatar scaryfish 3 post(s)

Thanks for the quick reply.

I have removed the “xmltv” entries, and now it doesn’t have the errors, but it still doesn’t work as expected. Instead of the channels you would expect from just looking at the xml file directly, you get duplicate channels. The list ends up as:
2
2
SKY Movies 2
SKY Movies 2
and then the rest. One seems to be missing, but the channel it has called 2 is in fact One. Also no program data shows up in the program guide (it just says it has no data to display).

Thanks for your help.

 
Avatar scaryfish 3 post(s)

More specifically, the channel section of the xml file looks like this:
<channel id="3" xmlns="">
<display-name lang="en">3</display-name>
<icon src="http://nz.ontv.uni.cc/3.png" />
</channel>
<channel id="One" xmlns="">
<display-name lang="en">One</display-name>
<icon src="http://nz.ontv.uni.cc/One.png" />
</channel>
<channel id="SKY Movies 2" xmlns="">
<display-name lang="en">SKY Movies 2</display-name>
</channel>
<channel id="SKY Sport 1" xmlns="">
<display-name lang="en">SKY Sport 1</display-name>
</channel>
<channel id="SKY 1" xmlns="">
<display-name lang="en">SKY 1</display-name>
</channel>
<channel id="2" xmlns="">
<display-name lang="en">2</display-name>
<icon src="http://nz.ontv.uni.cc/2.png" />
</channel>
<channel id="C4" xmlns="">
<display-name lang="en">C4</display-name>
<icon src="http://nz.ontv.uni.cc/C4.png" />
</channel>
<channel id="Prime" xmlns="">
<display-name lang="en">Prime</display-name>
<icon src="http://nz.ontv.uni.cc/Prime.png" />
</channel>
<channel id="SKY Sport 2" xmlns="">
<display-name lang="en">SKY Sport 2</display-name>
</channel>
<channel id="Juice TV" xmlns="">
<display-name lang="en">Juice TV</display-name>
</channel>

whereas the data returned by curl http://data.titantv.com/dataservice.asmx/Reques… is
<?xml version=”1.0” encoding=”utf-8”?>
<stationcollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.titantv.com/services/dataservice"> <errorcode>0</errorcode> <errordescription>OK</errordescription> <stationcount>10</stationcount> <usingcacheddata></usingcacheddata> <stations> <station> <station_id>1</station_id> <call_sign>SKY Movies 2</call_sign> <rf_channel>3</rf_channel> </station> <station> <station_id>2</station_id> <call_sign>2</call_sign> <rf_channel>2</rf_channel> </station> <station> <station_id>3</station_id> <call_sign>SKY Movies 2</call_sign> <rf_channel>3</rf_channel> </station> <station> <station_id>4</station_id> <call_sign>SKY Sport 1</call_sign> <rf_channel>4</rf_channel> </station> <station> <station_id>5</station_id> <call_sign>SKY 1</call_sign> <rf_channel>5</rf_channel> </station> <station> <station_id>6</station_id> <call_sign>2</call_sign> <rf_channel>2</rf_channel> </station> <station> <station_id>7</station_id> <call_sign>C4</call_sign> <rf_channel>7</rf_channel> </station> <station> <station_id>8</station_id> <call_sign>Prime</call_sign> <rf_channel>8</rf_channel> </station> <station> <station_id>9</station_id> <call_sign>SKY Sport 2</call_sign> <rf_channel>9</rf_channel> </station> <station> <station_id>10</station_id> <call_sign>Juice TV</call_sign> <rf_channel>10</rf_channel> </station> </stations>
</stationcollection>

 
Avatar Guillaume Bo... Administrator 203 post(s)

For channels such as this, there’s no way for EEP to be able to map that to a real channel number:
<channel id="One" xmlns="">
<display-name lang="en">One</display-name>
<icon src="http://nz.ontv.uni.cc/One.png" />
</channel>

EEP needs to be able to map each channel to a real number that appears in EyeTV.
To help it do that, you can add a display-name tag to each channel, that gives the real channel number you want each channel associated with.

So for example, if the above channel should be mapped to channel 1 in EyeTV, you should rewrite it like this:

<channel id="One" xmlns="">
<display-name lang="en">One</display-name>
<display-name lang="en">1</display-name>
<icon src="http://nz.ontv.uni.cc/One.png" />
</channel>

Add a display-name like that to each channel, and make sure none of them are repeated, and it should work fine.