1

I'm really stuck on how to get this working. I don't know what I need to include to get the plugin to output data.

Example XML feed:

<quote_feed version="1">
    <latest_price>
        <time>13:24:28</time>
        <mid_price>49.00</mid_price>
        <offer_price>50.00</offer_price>
        <bid_price>48.00</bid_price>
    </latest_price>
</quote_feed>

What tags to I need to output the bid price for example? Thanks for anyone's help!

Tags I'm using:

{exp:ajw_feedparser 
    url="feed name"
    cache_refresh="10"
    limit="8"
    debug="true"
    date="pubDate"
}

<p>{mid_price}</p>

{/exp:ajw_feedparser} 

Error output:

Cache file exists

Cache file is fresh (51 seconds remaining)

No tags available.

Thanks for your help.

  • Please include the template tags you are currently using and what output or error you get. Also, you'll probably find Feed Parser's debug parameter useful (see the docs). – Alex Kendrick Feb 11 '14 at 16:48
2

If you want just the child elements of latest_price, you need to set it as the root of the loop.

{exp:ajw_feedparser 
    url="feed name"
    cache_refresh="10"
    limit="8"
    debug="true"
    itempath="/quote_feed/latest_price"
}
    <p>{mid_price}</p>
{/exp:ajw_feedparser}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.