I’ve updated the code/zip file in the first post of the thread to include colon replacement as well as adding an incremental integer when encountering duplicate items (within the same xml depth):
[+LINK.HREF+]
[+LINK.TITLE+]
[+LINK.1.TYPE+]
[+LINK.1.HREF+]
etc.
Let me know how it works.
@kylej:
To avoid unnecessary rendering when you are retrieving the data structure, I have created a separate function to only get the parsed xml data (it will also re-retrieve if the cache has expired). Please follow the below example:
$feedx = new FeedX($config);
$feedx->getData();
$yourarray = $feedx->elements; // or reference $feedx->elements directly
If you need to change the URL or other configuration parameters used by FeedX, you can do it within a single instance rather than having to create separate instances every time:
$feedx->config['url'] = 'new url'; // Be sure to use ? & and = in this URL rather than replacing
$feedx->getData(); // Get new feed
By the way, my current template presets are pretty weak at the moment - if anyone wants to share their own creations I’d be glad to bundle them as the defaults.