Hi Alexander,
Try to make a response from the beginning - if it will not help, let us know.
Hi Alexander,
Try to make a response from the beginning - if it will not help, let us know.
It did not help. Same result.
I see the same behaviour also with other entries. In all cases the entry has some extra 'things' like:
code<d:SubTitle xml:space="preserve">/code
instead of:
code<d:SubTitle>/code
Hi Alexander,
It's better to know the exact response structure. Do you have a possibility to contact the service provider for getting such information?
No. I do not at this time.
It works well for most entries. The only problem that I can find is the one above where there are the extra things.
I studied the response structure and there are not that many variations.
The one with "preserve" is the only one I could find. Apart from an empty one:
code<d:Title m:null="true" />/code
Is it possible to remove the extra tags after loading using javascript?
Or is there a way to ignore extra tags?
Can you post a sample XML response that doesn't work?
Here a part of the XML response. One the first part has the problem, the secound part works fine:
code
<entry>
<id>http://www.museumkaart.nl/Services/SchatkamerService.svc/SchatkamerKaartSet(6158)</id>
<title type="text"></title>
<updated>2013-11-17T09:01:01Z</updated>
<author>
<name />
</author>
<link rel="edit" title="TreasuryCard" href="SchatkamerKaartSet(6158)" />
<category term="Museumvereniging.Shared.Treasury.TreasuryCard" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:Id m:type="Edm.Int32">6158</d:Id>
<d:MuseumId m:type="Edm.Int32">108</d:MuseumId>
<d:Title>DEVENTER</d:Title>
<d:SubTitle xml:space="preserve">Speelgoedmuseum </d:SubTitle>
<d:Description xml:space="preserve">Speelgoedmuseum Deventer exposeert in twee grote 14e-eeuwse huizen zijn verzameling in Nederland gebruikt speelgoed. Van opgegraven speelgoed uit de 13de eeuw tot het modernste speelgoed van vandaag.
</d:Description>
<d:ImageUrl>http://cdn.museum.nl/cards/240x135/58b4dff5-dd01-427c-ab49-b75d3e48d50b\speelgoedmuseum deventer.jpg</d:ImageUrl>
<d:HasPromotions m:type="Edm.Boolean">false</d:HasPromotions>
<d:IsPromotion m:type="Edm.Boolean">false</d:IsPromotion>
<d:IsParticipant m:type="Edm.Boolean">true</d:IsParticipant>
<d:EndDate m:type="Edm.DateTime" m:null="true" />
<d:DetailUrl>/museum/Gemeentemusea+Deventer%2fSpeelgoedmuseum/Speelgoedmuseum+Deventer.aspx</d:DetailUrl>
<d:MagazineTheme m:null="true" />
<d:MagazineThemeTitle m:null="true" />
</m:properties>
</content>
</entry>
<entry>
<id>http://www.museumkaart.nl/Services/SchatkamerService.svc/SchatkamerKaartSet(1044)</id>
<title type="text"></title>
<updated>2013-11-17T09:01:01Z</updated>
<author>
<name />
</author>
<link rel="edit" title="TreasuryCard" href="SchatkamerKaartSet(1044)" />
<category term="Museumvereniging.Shared.Treasury.TreasuryCard" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:Id m:type="Edm.Int32">1044</d:Id>
<d:MuseumId m:type="Edm.Int32">428</d:MuseumId>
<d:Title>MELDERSLO</d:Title>
<d:SubTitle>MUSEUM DE LOCHT</d:SubTitle>
<d:Description>Bezoek de authentieke Noord-Limburgse langgevelboerderij en ervaar het leven op het platteland tussen 1850 en 1950. Neem een kijkje in de ouderwetse keuken, de ‘beste’ kamer met bedstee, de opkamer, kelder en bijkeuken.</d:Description>
<d:ImageUrl>http://cdn.museum.nl/cards/240x135/locht3.jpg</d:ImageUrl>
<d:HasPromotions m:type="Edm.Boolean">false</d:HasPromotions>
<d:IsPromotion m:type="Edm.Boolean">false</d:IsPromotion>
<d:IsParticipant m:type="Edm.Boolean">true</d:IsParticipant>
<d:EndDate m:type="Edm.DateTime" m:null="true" />
<d:DetailUrl>/museum/Museum+De+Locht+Limburg/De+Locht%2c+Nationaal+Asperge-+en+Champignonmuseum.aspx</d:DetailUrl>
<d:MagazineTheme m:null="true" />
<d:MagazineThemeTitle m:null="true" />
</m:properties>
</content>
</entry>
/code
The XML fails validation here: http://www.xmlvalidation.com/
I checked the whole feed with xmlvalidation (copy and paste from chrome) and the XML is valid (see screenshot).
I also tried the feed with different validators, and the feed is valid.
You can try yourself at: http://validator.w3.org/feed/ (see screenshot)
For the feed link see first post (you can change the 20 to 500 for more entries).
I have found the following working solution:
code
if (typeof value == 'string')
return value;
else
if(typeof value != 'undefined')
return ""
else
return value["content"];
/code
Hello! Thank you for update! Glad it's working now.