Title: [Plugin: Advanced XML Reader] Loop through multiple XML files
Last modified: August 20, 2016

---

# [Plugin: Advanced XML Reader] Loop through multiple XML files

 *  [lkggrif](https://wordpress.org/support/users/lkggrif/)
 * (@lkggrif)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/)
 * I like the plugin, but am looking for the functionality to loop through multiple
   XML files to extract the same tag value and post it on a page against the appropriate
   entry.
    The base url is the same, but using different variables to call the xml
   file: ex: BaseUrl/showxml?_variablename_=_variablevalue_ where the shortcode 
   could then be something like: `[advanced-xml tag="tagname" id="variablevalue"]`
 * If there is anyway for me to do this, let me know.
 * [http://wordpress.org/extend/plugins/advanced-xml-reader/](http://wordpress.org/extend/plugins/advanced-xml-reader/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * (@raymonddesign)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494584)
 * I understand your problem, but it’s a very specific problem and I think the plugin
   is not the right place to fix this individual problem. But, it is possible to
   tweak the plugin and create a custom plugin.
 * I hope I informed you enough.
    Kind regards, RaymondDesign
 *  Thread Starter [lkggrif](https://wordpress.org/support/users/lkggrif/)
 * (@lkggrif)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494587)
 * Thanks for your prompt response. I was afraid that would be the answer. Thanks
   so much, I’ll see what I can do.
 *  Plugin Author [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * (@raymonddesign)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494600)
 * It’s not difficult when you have some knowledge about PHP.
 * When you have any problems, you can always contact me:
    – using these forums –
   on dev.raymonddesign.nl – on [http://www.raymonddesign.nl/contact.html](http://www.raymonddesign.nl/contact.html)(
   it’s in dutch, but I think you’ll understand it, it’s just a contact form)
 * RaymondDesign
 *  Thread Starter [lkggrif](https://wordpress.org/support/users/lkggrif/)
 * (@lkggrif)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494634)
 * Thanks, while I can navigate through PHP enough to understand what the code is
   doing, beyond making extremely simplistic changes, I don’t work in PHP.
    So while
   not difficult for someone with knowledge of PHP, currently beyond my scope of
   knowledge.
 *  [Reinhard Stompe](https://wordpress.org/support/users/crashguru/)
 * (@crashguru)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494897)
 * Hi,
    I have exactly the same problem. I am almost sure many more people with 
   affiliated suppliers would like to have this feature plus a more comprehensive
   parser. I would even pay for it -:)
 *  Plugin Author [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * (@raymonddesign)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494898)
 * I’ll see what I can do for you. Maybe it’s possible to add this to the new version
   I’m currently working on.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [14 years ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494980)
 * Did you ever work on this?
    It seems like you could use a parameter to the shortcode
   to indicate the xml file, instead of storing it in the options. Or have that 
   xml file be the default if none is specified.
 *  Plugin Author [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * (@raymonddesign)
 * [14 years ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494981)
 * Hi Joy,
    That’s exactly what I was thinking. Unfortunately I don’t have much 
   time at this moment. My plan is to fully rewrite the plugin. But I have more 
   important things to do at this moment, as I work on this plugin in my spare time.
   Here’s a poll with to two options of the new version: [http://dev.raymonddesign.nl/2012/01/need-your-help/](http://dev.raymonddesign.nl/2012/01/need-your-help/)
   As you can see, many people prefer the one with a config page. I’m still in doubt
   about the best solution.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494989)
 * I haven’t actually looked at the code for this plugin.
    I think if you modularize
   the code, you could easily solve more problems. The code to extract a tag should
   be one piece. It shouldn’t matter to it which file the xml came from. It should
   just extract the tag (and apply_filters or do_action when it finds it) and return
   it. The code to read the xml file is also independent. It should be given a filename
   and return the xml. Then the code that handles the options is separate. The shortcode
   can be invoked with or without a filename. The shortcode handler would check 
   for the filename and if it didn’t have one, look in the options.
 * With it all separate, user code could be invoked on the hooks to store the data
   or total it or email it or whatever. This way, you aren’t limited to one xml 
   file or one tag from the file.
 *  Plugin Author [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * (@raymonddesign)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494990)
 * Thanks Joy!
    That sounds very nice. The code is sort of modular right now (there
   are some functions), but it is not real Object Oriented. But, you gave me a very
   nice start. When I have some time I’ll bring this to a real version.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘[Plugin: Advanced XML Reader] Loop through multiple XML files’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-xml-reader_56585a.svg)
 * [Advanced XML Reader](https://wordpress.org/plugins/advanced-xml-reader/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-xml-reader/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-xml-reader/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-xml-reader/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-xml-reader/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-xml-reader/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [RaymondDesign](https://wordpress.org/support/users/raymonddesign/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-advanced-xml-reader-loop-through-multiple-xml-files/#post-2494990)
 * Status: not resolved