XML Import specification
Details of the XML specification used by Key4Living.com to import property details from other systems.
This page details the specification of an XML feed to send property information to Key4Living.com
Your property feed must be an absolute feed of all your property information – not an incremental one. Each time we process a feed, we evaluate it against every property for that account in the Key4Living database. Your feed must contain ALL the properties that you want ADDED or UPDATED. It should not contain any properties that you want to DELETE.
ADD A PROPERTY
When a property is added to your database, there will be a new property record for it in your feed. It will be inserted to our database and we will process and store all associated images
UPDATE A PROPERTY
If a property is updated in your database, the <date> tag in your feed should also change. When we see a change in the <date>tag, the property will be updated in our database and we will process all associated images. Please note, if the date does not change, we will not update the property, and if the date is invalid or does not conform to this specification, the XML feed will be updated weekly rather than daily.
DELETE A PROPERTY
If a property is deleted from your database, there will be no property record for it in your feed. We delete properties and any associated images from our database when there is no matching property record in your feed.
In order to correctly insert, update or delete, we must consistently identify each property as a unique entity in your feed. We do this using the <id> tag which must consistently and uniquely identify each one of your properties.
2. Guidelines & Conventions
You must code your feed to break new tags onto new lines (there’s a single-line character limit that our parser can handle) – it also makes it much easier for us to read and troubleshoot your feed. Use /n in the script that creates your XML output.
When you view the XML output in a text editor – you should see each tag on a new line. Use the same method for forcing line breaks in the description text for each property or you can use the UTF-8 numeric entity in the descriptions themselves.
In the detailed notes we tell you what tags to use, what they can contain and whether a tag is mandatory or optional.
XML Tags look like this: <beds>4</beds>
Comments look like this: // optional numeric
A tag can be ‘optional’ or ‘mandatory’ and can contain ‘alpha’, ‘alphanumeric’ or ‘numeric’ characters. The <date> tag is the only exception where it must be formatted as datetimeYYYY-MM-DD HH:MM:SS
If a tag is permitted to be empty (optional tags) – this can be coded in one of four ways:
<beds>0</beds> (where numeric values are permissible)
<beds /> (self-closing)
(complete tag missing)
All tags are CaSe SenSiTiVe and MUST be in lower case throughout: <DESC> is NOT the same as <desc>
Do not include a ‘no image’ or ‘photo coming soon’ image URL for properties where there are no actual property photos.
Do not use any [[CDATA]] tags in your feed as a ‘quick fix’ for character encoding problems, these will be stripped during import. Please refer to the section About Character Encoding.
3. Outline of Feed Structure
The structure of a fully featured property record is detailed in the right-hand margin of this page. Your feed will contain multiple properties by repeating the structure enclosed by <property></property> for each one.
When building the feed, refer to the detailed notes
4. About Character Encoding
There are five characters which must be encoded if you want to use them in your feed. This is because they have predefined functions in XML: (you could use their numeric entities too).
< – The less than sign (<) – <
> – The greater than sign (>) – >
& – The ampersand (&) – &
' – The single quote or apostrophe (‘) – '
" – The double quote (“) – "
When should they be encoded and when left alone?
For example: <image id=”9″> – the quotes are not encoded because they’re delimiting an XML attribute within an XML tag.
<desc>A "beautiful" house</desc> – the quotes are encoded because they’re part of a text string.
<property> should not be encoded as <property> or <property>
The text string bed & breakfast must be encoded as bed & breakfast or bed & breakfast – in the first instance using a XML entity and, in the second, a numeric entity.
In this example, the XML entity & is the same as it’s HTML equivalent. However, in general, HTML entities should not be used in your feed. There should be no HTML entities, tags or formatting anywhere within the feed.
Before submitting a feed to Key4Living.com, test it using this character validator, selecting UTF-8 as the encoding scheme.
5. Add the feed to your account
Once your feed is done.
Log into your broker page and go to XML Settings.
Paste the URL to your XML feed. This has to be the absolute URL and cannot be redirected to another page.
Press the Save XML button.
If there is any errors in your feed, we will tell you!
We have now stored your XML-url into our database. To manually uodate your feed. Press the UPDATE XML button. We will now process your feed and do all the inserts, updated and deletes. If you have alot of properties, this part just might slow down your browser. Therefor we will email you any statistics when we are done!
6. Automating Property Updates
Once your feed is uploaded and saves into our database we will update it every night. If you want to update it earlier. Press the "UPDATE XML FEED" button on the settings page.
If there is any changes in your feed, we will email you about it!
If you have errors in your feed, the properties will be inserted but inactive. Go to your page and fix the faults.
It’s important to remember that you should ALWAYS use your original property management system to manage your property details, NOT your Key4Living.com account. When we process your feed, we REPLACE the information already contained in your Key4Living.com account.
If you have a problem or question which is not addressed here, or you spot an error in our documentation, please go to the contact us page and tell us!