Invalid XML (naked &) in Output API activity keywords

瀏覽次數:0 次
跳到第一則未讀訊息

John Latham

未讀,
2009年6月17日 上午8:05:042009/6/17
收件者:Plings Developer Support
The XML below shows incorrectly encoded "&" characters in activity
keywords received from the Output API.

This causes our parser to fail.

Oddly, there are examples of both correctly and incorrectly encoded
ampersands in the same set of keywords:

<keyword>employment &amp; training advice</keyword> << GOOD
<keyword>photocopying (colour and b&w)</keyword> << BAD

Cheers,
John
-------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plings SYSTEM "http://feeds.plings.net/xml.activity.dtd">
<plings>
<generated>
<year>2009</year>
<month>06</month>
<monthName>June</monthName>
<dayofmonth>17</dayofmonth>
<hour>12</hour>
<min>17</min>
<sec>15</sec>
<requested></requested>
</generated>
<activity id="96241">
<Name>Libraries - North City</Name> <Starts>2009-06-17 09:00:00</
Starts> <Ends>2009-06-17 20:00:00</Ends>
<Details>&lt;p&gt;&lt;strong&gt;Opening Hours&lt;/strong&gt; &lt;/
p&gt;&lt;ul&gt;Monday: 9.00am - 8.00pm Tuesday: 9.00am - 8.00pm
Wednesday: 9.00am - 8.00pm Thursday: 9.00am - 8.00pm Friday 9.00am -
5.00pm Saturday 9.00am - 5.00pm Sunday: 12.00noon - 4.00pm&lt;/
ul&gt;&lt;p&gt;&lt;strong&gt;Regular Events &lt;/strong&gt;&lt;/
p&gt;&lt;ul&gt;Benefits surgery (Help and advice about Housing Benefit
and Council Tax Benefit) on Tuesday 10am - 4.30pm (Please phone the
Revenues and Benefits Unit on 0161 234 3695 for an appointment) Coffee
Break on first Wednesday of the month 2 - 3pm Councillors&amp;#39;
Surgery every Monday 6.30 - 7.15pm Local History Group (Please contact
us for details of next meeting) Reading Group on second Sunday of the
month 1.30 - 3pm Tiny Tots and Toddler Time on Thursday 10:30 -
11:30am (term time only)&lt;/ul&gt;</Details> <MinAge>0</MinAge>
<MaxAge>0</MaxAge> <Cost>0.00</Cost> <ProviderProjectDept></
ProviderProjectDept> <ContactName>North City Library</ContactName>
<ContactNumber>0161 219 6442</ContactNumber>
<ContactEmail>n...@manchester.gov.uk</ContactEmail>
<ContactAddress>North City Library&lt;br /&gt;Rochdale Road&lt;br /
&gt;Harpurhey&lt;br /&gt;Manchester&lt;br /&gt;M9 4AF</
ContactAddress> <categories>
<category>Creative &amp; Cultured</category>
<category>Art</category>
</categories>
<ecmareas>
<ecmarea>Enjoy and Achieve</ecmarea>
</ecmareas>
<keywords>
<keyword>access point</keyword>
<keyword>books for loan</keyword>
<keyword>books for loan in vietnamese</keyword>
<keyword>business information zone</keyword>
<keyword>cds for loan</keyword>
<keyword>children's dvds for loan</keyword>
<keyword>computer trainer</keyword>
<keyword>computing facilities</keyword>
<keyword>dvds for loan</keyword>
<keyword>employment &amp; training advice</keyword>
<keyword>health information point</keyword>
<keyword>homework club</keyword>
<keyword>local studies collection</keyword>
<keyword>macmillan information service</keyword>
<keyword>meeting room</keyword>
<keyword>newspapers and magazines</keyword>
<keyword>photocopying (colour and b&w)</keyword>
<keyword>playstation games for loan</keyword>
<keyword>reading group</keyword>
<keyword>talking books for loan</keyword>
<keyword>visually impaired peoples' unit</keyword>
<keyword>Internet access</keyword>
<keyword>Using Computers</keyword>
<keyword>Reading</keyword>
</keywords>
<venue id="1771">
<Name>North City Library</Name> <BuildingNameNo>North City Library</
BuildingNameNo> <Street>Rochdale Road</Street> <Town></Town>
<PostTown>Manchester</PostTown> <County>Lancashire</County>
<Postcode>M9 4BP</Postcode> <Telephone>0161 219 6442</Telephone>
<PlingsPlacesLink>http://places.plings.net/index.php/v/1771</
PlingsPlacesLink> <Latitude>53.511782</Latitude> <Longitude>-2.214101</
Longitude> </venue>
<provider id="331">
<Name>Manchester Libraries</Name> <Website>www.manchester.gov.uk/
libraries/</Website> <Contact>. .</Contact> <Email>.</Email> <Phone>.</
Phone> <Fax></Fax> <BuildingNameNo>City Hall</BuildingNameNo>
<Street></Street> <Town></Town> <PostTown></PostTown> <County></
County> <Postcode>M60 2LA</Postcode> <Latitude></Latitude>
<Longitude></Longitude> </provider>
</activity>
</plings>

David - APB

未讀,
2009年6月17日 上午8:28:492009/6/17
收件者:Plings Developer Support
Hi John

Thanks for this.

I actually think we encountered this recently, and I thought we had
fixed it.

It's something for Al to look into. He's off today, so I'll make sure
he has a look tomorrow.

I'm pretty sure that at the moment the data from Manchester contains
the problem keywords, if for today you can use Stockport or Blackpool
data for testing/development, you may still be able to do your work.

Thanks
David
P.S. Never mind the other issue about whether or not 'black and white
photocopying' is a keyword!

David - APB

未讀,
2009年6月18日 清晨6:40:252009/6/18
收件者:Plings Developer Support
John

We're having trouble re-creating the problem.

Our calls to the activity above (96241) are showing in the source that
the ampersands are encoded. (We haven't just fixed it! Honest!)

Can you let us know what call you are using to get the data please?
(send them directly by email if it exposes keys you want to keep
private)

Cheers
David
回覆所有人
回覆作者
轉寄
0 則新訊息