Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andrew Bright 84 posts 244 karma points
    Feb 11, 2017 @ 09:49
    Andrew Bright
    0

    Mapping Issue

    I have an xml import from : http://services.jupix.co.uk/api/get_properties.php?clientID=ce5385e4d6f49ce36a5e1c0b3fa981d4&passphrase=GHvYG9f

    It contains both sales/lettings properties and the fields are slightly different:

    Sales has

    <price>29950</price>
    <forSalePOA>0</forSalePOA>
    

    Letting has

    <rent>700</rent>
    <rentFrequency>1</rentFrequency>
    <toLetPOA>0</toLetPOA>
    

    When I go through the import wizard the lettings specific fields arent available to map is there something i am missing?

    Any advise appreciated thanks

  • Andrew Bright 84 posts 244 karma points
    Feb 12, 2017 @ 23:05
    Andrew Bright
    0

    So the problem appears to be the mapping is created from the first recognised pattern in the xml so if the data order is reversed and lettings are put first then the lettings fields are available to map:

    <rent>700</rent>
    <rentFrequency>1</rentFrequency>
    <toLetPOA>0</toLetPOA>
    

    But Not the sales fields:

    <price>29950</price>
    <forSalePOA>0</forSalePOA>
    

    I need both to be available.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 13, 2017 @ 07:02
    Richard Soeteman
    0

    Hi Andrew,

    It's because the Dataprovider expects that the first record contain all the fieds that are available to map.

    Maybe you can split up the import in two using an xpath expression so you have all the fields for letting and sales.

    Hope this helps,

    Richard

  • Andrew Bright 84 posts 244 karma points
    Feb 13, 2017 @ 10:05
    Andrew Bright
    0

    Hi Richard,

    I thought that might be the case can you advise on the xpath expression please:

    Would sales be:

    //*[department()="sales"]

    And lettings:

    //*[department()="lettings"]

    Also would this mean essentially having two imports setup with the respective xpaths?

    Many Thanks

    Andrew

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 13, 2017 @ 10:27
    Richard Soeteman
    100

    HI Andrew,

    Don't know the xpath from top of my head but looks right. And yes you need two import definitions.

    Hope this helps,

    Richard

  • Andrew Bright 84 posts 244 karma points
    Feb 13, 2017 @ 15:29
    Andrew Bright
    1

    Hi Richard,

    Many thanks managed to get it sorted with the below xpaths:

    Sales:

    //*[department/text()="Sales"]
    

    Lettings:

    //*[department/text()="Lettings"]
    

    Thanks

    Andrew

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 14, 2017 @ 07:14
    Richard Soeteman
    1

    Great to hear!

Please Sign in or register to post replies

Write your reply to:

Draft