Justin Norton wrote: > Just a quick query to ask if anyone knows of a way to parse the tpeg data > from: > http://www.bbc.co.uk/travelnews/tpeg/en/local/rtm/rtm_tpeg.xml using > PHP? Basically, I keep getting entity errors and have tried a few > different techniques but can't resolve the problems.
Do you have line references for the entity errors? I was going to say xml_parse_into_struct() worked fine here, but it turns out it loses all the internally defined entities, replacing them with blanks. http://bugs.php.net/bug.php?id=30875 refers. XML::Simple in Perl does the same, and minidom in Python, and full xml_parse() in fact, hmm. Firefox says the entity is undefined. There are errors in the DTD - use of non-ISO-8859-1 apostrophes and quotes - but I fixed them and it doesn't appear to make any difference. The only awful hacky way would be to replace &loc and &rtm with &loc and &rtm, then xml_parse_into_struct() works fine here with no errors and with all the data apparently present. Hope that's helpful. -- ATB, Matthew | http://www.dracos.co.uk/ - Sent via the backstage.bbc.co.uk discussion group. To unsubscribe, please visit http://backstage.bbc.co.uk/archives/2005/01/mailing_list.html. Unofficial list archive: http://www.mail-archive.com/[email protected]/

