Support » Requests and Feedback » custom XML output

  • ssdesign


    I wanted to create custom XML output for wordpress blog I have on my website.

    I did not want to have a HTML+CSS layout, I wanted to create a Flash Interface.

    For the same, I wrote a custom theme. At that time, I realsied that to get a complete custom output, I have to edit some files in the wp-includes folder as well.

    For example:

    in ‘template_functions-general.php’ file, I had to modify the ‘function get_archives_link()’ function by adding an extra ‘if’ statement:

    } elseif (‘XML’ == $format) {
    return “<Archive archLink=\”$url\” archTitle=\”$text\” />”;

    Like this, I had to change a few functins to be able to generate complete valid XML from the core code.

    My question is, can WordPress address this feature in future by adding the ability to generate XML output using custom themes?


Viewing 8 replies - 1 through 8 (of 8 total)
  • This would be really, really fantastic if it was possible without altering the core files. It would then make it the only blog / pcms that supported raw xml output!

    I just want to say, this is a nice feature.

    can someone post a link, where we can add the suggestion to the wordpress dev team. ?

    Yes, I am a strong advocate of this and after writing my custom XML output, it was so easy to port wordpress to Flash.

    I am sure others will find alternative usage of haveing a raw XML output.

    Can we really add this feature? I can share my experience if people are interested.

    I think I have found a way to make an XML Theme, the major issue will be that all of us have his / her own way of formatting XML, so the way I program this will most likeley not fit everyones pocket. However I have made it possible by editing existing plugins, combination of numerous of extra scripts, and made it to one plugin-file.

    Don’t know when it will be finished, but I will let you know!

    All of you who are interested of this, please follow my development of this “Theme” on my site. I will continuously post updates and snippets from the progress, so we all can reach somewhat a unified XML Output!

    My Flash-Wordpress project is now in a stable state.

    Sourceforge link:

    Let me know if you happen to test it.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Making the blog output a custom XML format is fairly straightforward, actually. It’s really just a matter of editing your theme to do whatever XML you want. You’d obviously need to clone and then edit some of the existing WordPress functions into the functions.php file for your theme (I would recommend using functions.php instead of using a plugin, because these functions are likely to be very specific to your theme).

    However, it seems like it would be better to write your Flash so as to use something more standardized, like, say, RSS. Then it could read the existing RSS feed (or any RSS feed) and display it as it sees fit.

    RSS feeds can populate the first view, but as you navigate, I need to generate custom XML for each view. Thats why I used this approach.

    You are right about functions.php, I just put then in a plugin file, but yes that could have been in functions.php as well.

    And infact I am using the same approach as you specified and I have created a custom theme that outputs only XML.

    Thanks for your comments 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘custom XML output’ is closed to new replies.