<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!-- root element -->
    <xsd:element name="listing_feed" type="listing_feedType" />
    <xsd:complexType name="listing_feedType">
        <xsd:sequence>
            <!-- date of feed generation -->
            <xsd:element name="feed_generated_time" type="xsd:dateTime" />
            <xsd:element name="listings" type="listingsType" />
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="listingsType">
        <xsd:sequence>
            <xsd:element maxOccurs="unbounded" name="listing" type="listingType" />
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="listingType">
        <xsd:sequence>
            <!-- Unique ID for this listing. Is the same id for the listing in subsequent versions of the feed. -->
            <xsd:element name="id" type="xsd:int" />
            <!-- The URL of the details page for this listing. -->
            <xsd:element name="url" type="xsd:string" />
            <!-- The category of the item. "housing/rent/vacation" in all cases.  -->
            <xsd:element name="category" type="xsd:string" />
            <!-- The title of the listing. Name of the property. -->
            <xsd:element name="title" type="xsd:string" />
            <!-- A description of the listing. -->
            <xsd:element name="description" type="xsd:string" />
            <!-- The date/time at which the listing expires. -->
            <xsd:element name="expire_time" type="xsd:date" />
            <!-- A URL pointing to a full-sized (not thumbnail) image of the item being listed. -->
            <xsd:element name="image_url" type="xsd:string" />
            <!-- Specific keywords related with the item being listed. -->
            <xsd:element name="keywords" type="xsd:string" />
            <!-- The price of the listing. Note that a price of zero (0) means free. If the price is unknown or not specified, then this field is left it blank. -->
            <xsd:element name="price" type="xsd:decimal" />
            <!-- The name of the original source of the listings. In all cases "rentalo.com" -->
            <xsd:element name="secondary_source" type="xsd:string" />
            <!-- The location fields indicate the location of the item being listed. -->
            <xsd:element name="location" type="locationType" />
            <!-- Additional Information of the item being listed. -->
            <xsd:element name="attribute" type="attributeType" />
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="attributeType">
        <xsd:sequence>
            <!-- The number of bathrooms. -->
            <xsd:element name="bathrooms" type="xsd:int" />
            <!-- The number of bedrooms. -->
            <xsd:element name="bedrooms" type="xsd:int" />
            <!-- The set of amenities possessed by the residential unit or residential complex. -->
            <xsd:element name="condition" type="xsd:string" />
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="locationType">
        <xsd:sequence>
            <!-- The street address of the listing. -->
            <xsd:element name="address" type="xsd:string" />
            <!-- The name of the city. -->
            <xsd:element name="city" type="xsd:string" />
            <!-- The country abbreviation. -->
            <xsd:element name="country_code" type="xsd:string" />
            <!-- The abbreviation for the province or state. -->
            <xsd:element name="state_code" type="xsd:string" />
            <!-- Latitude, in degrees. -->
            <xsd:element name="latitude" type="xsd:decimal" />
            <!-- Longitude, in degrees. -->
            <xsd:element name="longitude" type="xsd:decimal" />
            <!-- The postal code or zip code of the listing. -->
            <xsd:element name="zip_code" type="xsd:int" />
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
