EE 1.6.8
Magpie parser 1.4
Hi there,
I’m trying to use the in-built Magpie RSS/Atom Parser to call a third party XML feed.
I’m getting encoding errors when trying to call the following file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0" xmlns:job="http://:../../webrecRSS.dtd">
<channel>
<title>search form results</title>
<link></link>
<description></description>
<item>
<title>Finance Officer</title>
<link> http://:/ETREC107GF.open?VACANCY_ID=24017407K2&WVID=35584105Xh</link>
<guid> http://:/ETREC107GF.open?VACANCY_ID=24017407K2&WVID=35584105Xh</guid>
<description><![CDATA[<b>Reference:</b>
<b>Description:</b> The main responsibility of the Receptionist is to present an efficient and friendly front line image of Link to the public and to provide a high level of service to Link Housing, Link Group and Link Living staff.
The post holder will have a good standard of education.
Link offers excellent terms and conditions, and as an Investor in People and Healthy Working Lives Gold Award holder, we aim to provide a wide range of development opportunities and healthy living initiatives. You'll work with colleagues who offer support to ensure our customers' expectations are met. In return, we are looking for applications from people who will contribute to our aims and work to the highest professional standards.
Further Info:-
Job Description
Person Specification
<b>Region:</b> Link Group
<b>Location:</b> Edinburgh
<b>Salary:</b> £20,000 to £25,000
<b>Package:</b> Full time, 35 hours per week Monday to Friday ]]></description>
<job:description>The main responsibility of the Receptionist is to present an efficient and friendly front line image of Link to the public and to provide a high level of service to Link Housing, Link Group and Link Living staff.
The post holder will have a good standard of education.
Link offers excellent terms and conditions, and as an Investor in People and Healthy Working Lives Gold Award holder, we aim to provide a wide range of development opportunities and healthy living initiatives. You'll work with colleagues who offer support to ensure our customers' expectations are met. In return, we are looking for applications from people who will contribute to our aims and work to the highest professional standards.
Further Info:-
Job Description
Person Specification</job:description>
<job:reference></job:reference>
<job:salary>£20,000 to £25,000</job:salary>
<job:salaryval></job:salaryval>
<job:minsalary></job:minsalary>
<job:maxsalary></job:maxsalary>
<job:category>Finance</job:category>
<job:closingdate>Fri, 25 Nov 2011 00:00:00 GMT</job:closingdate>
<job:region>Link Group</job:region>
<job:location>Edinburgh</job:location>
<job:package>Full time, 35 hours per week Monday to Friday</job:package>
Wed, 16 Nov 2011 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
I enclose my code attempting to call the file below :
<!doctype html>
<html lang="en-us" class="no-js">
<head>
<meta charset="utf-8">
<title dir="ltr">Testing.</title>
</head>
<body>
<h1>Testing feed</h1>
{exp:magpie url="http://jobsrss35584105xh.xml" limit="3" refresh="720" feed_type="RSS" feed_version="2.0" encoding="ISO-8859-1" convert_encoding="y"}
<ul>
{magpie:items}
<li><a href="http://{magpie:link}">{magpie:title}</a></li>
{/magpie:items}
</ul>
{/exp:magpie}
</body>
</html>If I change the character encoding of the xml file to UTF-8 (on a static test file), the parsing works fine.
However presently using ISO-8859-1 is causing parsing errors - and unfortunately I can change the encoding on the 3rd party source.
What do I need to change to get this work?
BEst
Peter.