WordPress.org

Ready to get started?Download WordPress

Forums

Advanced XML Reader
Loop through multiple XML files (11 posts)

  1. lkggrif
    Member
    Posted 2 years ago #

    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/

  2. RaymondDesign
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. lkggrif
    Member
    Posted 2 years ago #

    Thanks for your prompt response. I was afraid that would be the answer. Thanks so much, I'll see what I can do.

  4. RaymondDesign
    Member
    Plugin Author

    Posted 2 years ago #

    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 (it's in dutch, but I think you'll understand it, it's just a contact form)

    RaymondDesign

  5. lkggrif
    Member
    Posted 2 years ago #

    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.

  6. crashguru
    Member
    Posted 2 years ago #

    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 -:)

  7. RaymondDesign
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  8. Joy
    Member
    Posted 1 year ago #

    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.

  9. RaymondDesign
    Member
    Plugin Author

    Posted 1 year ago #

    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/
    As you can see, many people prefer the one with a config page. I'm still in doubt about the best solution.

  10. Joy
    Member
    Posted 1 year ago #

    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.

  11. RaymondDesign
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic