Product Feed Error3

From Wiki

Revision as of 14:55, 9 March 2017 by Edward Chaput de Saintonge (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[-] Building an Awin Product Feed

[-] Product Feed Errors


Error #3 - Special characters in XML feed

What is the error?

File:SpecialCharacters.png

Why do I have this error?

Special characters are used in the XML file.

How can I resolve this error?

You can either HTML encode the characters or enclose them in CDATA tags.

Example #1 - HTML Encoding

  • & becomes &

    <name>Red &amp; Blue T-Shirt</name>

Example #2 - CDATA

  • Wrap the entire sentence/paragraph in a CDATA clause.
    <name><![CDATA[Red & Blue T-Shirt]]></name>

Example

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE merchant SYSTEM "http://www.awin.com/DTD/merchant/datafeedupload.1.5.dtd"><merchant>
<product weboffer="no" preorder="no" instock="yes" forsale="yes">
	<pid>2</pid>
	<name><![CDATA[9ct white gold 0.15 carat diamond hoop earrings]]></name>
	<desc><![CDATA[These diamond hoop earrings are designed in 9ct white gold with channel-set stones travelling all the way around. With a diameter of 15mm, they're the perfect size for daywear and will add that little bit of sparkle to your evening style.]]></desc>
	<spec><![CDATA[These diamond hoop earrings are designed in 9ct white gold with channel-set stones travelling all the way around. ]]></spec>
	<category><![CDATA[Jewellery]]></category>
	<lang><![CDATA[]]></lang>
	<brand><![CDATA[]]></brand>
	<purl><![CDATA[http://www.advertisername.co.uk/9ct-white-gold-0-15-carat-diamond-hoop-earrings.html]]></purl>
	<imgurl><![CDATA[http://www.advertisername.co.uk/media/catalog/product/1/2/1219024_3.jpg]]></imgurl>
	<thumburl><![CDATA[http://www.advertisername.co.uk/media/catalog/product/1/2/1219024_3.jpg]]></thumburl>
	<deltime><![CDATA[Allow 3 days]]></deltime>
	<currency>GBP</currency>
	<price>
		<actualp>299.00</actualp>
		<rrpp>299.00</rrpp>
	</price>
	<delcost>3.99</delcost>
	</product>
</merchant>

NOTE

Our DTD structure is strict and our tag mark-ups are not interchangeable, thus <pid> (which represents a product ID) should be formatted exactly as it is. This is the same for <purl>, <desc> and so forth.

DTD file.

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button