XML feed format for "cars"

These are some simple guidelines for the creation of a XML file to include ads from your site in OneKit. If you need more information about the XML format you can check the Wikipedia.

The XML file has one ‘OneKit’ tag, and one or more ‘ad’ elements. Each ‘ad’ element has the following fields:

  • url: URL of the ad on your website (required)
  • title: title of the ad (required)
  • content: content of the ad (required)
  • price: price of the car
  • make: make of the car (required)
  • model: model of the car (required)
  • color: color of the car (optional)
  • year: year of the car (optional)
  • city: city name
  • region: name of the region/county/state (optional)
  • postcode: postcode (optional)
  • mileage: mileage of the car on kilometers (optional)
  • doors: doors of the car (optional)
  • fuel: fuel del coche (ex. petrol, gasoil, etc) (optional)
  • transmission: transmission of the car (manual/automatic) (optional)
  • engine_size: engine sie of the car on c.c. (optional)
  • power: power of the car (optional)
  • seats: seats of the car (optional)
  • gears: number of gear change of the car (optional)
  • pictures: URLs of the pictures for this ad, see information below
  • date: date of the ad in the following format: DD/MM/YYYY

pictures: the ‘ad’ element may containt a set of ‘picture’ fields a part of the ‘pictures’ tag.
The tags of each ‘picture’ element are:

  • title: title of the picture (optional)
  • url: URL of the picture on your site

The XML feed would look like this:

<?xml version=”1.0″ encoding=”utf-8″?>
<onekit>

    <ad>
        <url><![CDATA[...]]></url>
        <title><![CDATA[...]]></title>
        <content><![CDATA[...]]></content>
        <price><![CDATA[...]]></price>
        <make><![CDATA[...]]></make>
        <model><![CDATA[...]]></model>
        <color><![CDATA[...]]></color>
        <year><![CDATA[...]]></year>
        <city><![CDATA[...]]></city>
        <region><![CDATA[...]]></region>
        <postcode><![CDATA[...]]></postcode>
        <mileage><![CDATA[...]]></mileage>
        <doors><![CDATA[...]]></doors>
        <fuel><![CDATA[...]]></fuel>
        <transmission><![CDATA[...]]></transmission>
        <engine_size><![CDATA[...]]></engine_size>
        <power><![CDATA[...]]></power>
        <seats><![CDATA[...]]></seats>
        <gears><![CDATA[...]]></gears>
        <pictures>
            <picture>
                <picture_url><![CDATA[...]]></picture_url>
                <picture_title><![CDATA[...]]></picture_title>
            </picture>
            <picture>
                <picture_url><![CDATA[...]]></picture_url>
                <picture_title><![CDATA[...]]></picture_title>
            </picture>
            …
        </pictures>
        <date><![CDATA[...]]></date>
        <time><![CDATA[...]]></time>
    </ad>

    <ad>
        ….

    </ad>

    <ad>
        ….
    </ad>

    …    

</onekit>

You can copy and paste the previous code and use it as a template for your own XML file.

Example XML feed

<?xml version=”1.0″ encoding=”utf-8″?>
<onekit>

    <ad>
            <url><![CDATA[http://www.yourdomain.com/ad/7004578]]></url>
            <title><![CDATA[Audi A3 for sale, almost new]]></title>
            <content><![CDATA[Audi A3 for sale, almost new, I'm selling it because
    I'm moving to another country]]></content>
            <price><![CDATA[20000]]></price>
            <make><![CDATA[Audi]]></make>
            <model><![CDATA[A3]]></model>
            <color><![CDATA[Black]]></color>
            <year><![CDATA[2004]]></year>
            <city><![CDATA[London]]></city>
            <region><![CDATA[London]]></region>
            <postcode><![CDATA[BR1]]></postcode>
            <mileage><![CDATA[5000]]></mileage>
            <doors><![CDATA[5]]></doors>
            <fuel><![CDATA[gasoil]]></fuel>
            <transmission><![CDATA[manual]]></region>
            <engine_size><![CDATA[1781]]></engine_size>
            <power><![CDATA[75]]></power>
            <seats><![CDATA[5]]></seats>
            <gears><![CDATA[5]]></gears>
            <pictures>
                <picture>
                    <picture_url><![CDATA[http://www.yourdomain.co.uk/image1.jpg]]></picture_url>
                    <picture_title><![CDATA[front]]></picture_title>
                 </picture>
                 <picture>
                     <picture_url><![CDATA[http://www.yourdomain.co.uk/image2.jpg]]></picture_url>
                     <picture_title><![CDATA[back]]></picture_title>
                 </picture>
             </pictures>
             <date><![CDATA[30/09/2006]]></date>
    </ad>

    <ad>
            <url><![CDATA[http://www.yourdomain.com/ad/332A53BC2]]></url>
            <title><![CDATA[Mercedes SLK for sale]]></title>
            <content><![CDATA[Mercedes SLK, 50,000 miles, for sale]]></content>
            <price><![CDATA[30000]]></price>
            <make><![CDATA[Mercedes]]></make>
            <model><![CDATA[SLK]]></model>
            <color><![CDATA[Gray]]></color>
            <year><![CDATA[2001]]></year>
            <city><![CDATA[London]]></city>
            <region><![CDATA[London]]></region>
            <postcode><![CDATA[BR1]]></postcode>
            <pictures>
                <picture>
                    <picture_url><![CDATA[http://www.yourdomain.co.uk/image1.jpg]]></picture_url>
                    <picture_title><![CDATA[front]]></picture_title>
                </picture>
	    </pictures>
               <date><![CDATA[20/09/2006]]></date>
    </ad>

</onekit>