Product Feed Error3
From Wiki
[-] Building an Awin Product Feed
[-] Product Feed Errors
Error #3 - Special characters in XML feed |
What is the error?
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 & 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.