WordPress output to XML

For my current project I’m working on a Flash site which is based on a WordPress backend. There are many API’s out there for retrieving and manipulating data (for example FlashPress and SWFPress), but the problem is that most of these libraries are basically an overload for the project I’m working on right now.

I think that there is a strong need for a wordpress structured XML that gives you all the data you need:

  • Navigation Menu (see Appearance>Menu)
  • Pages
  • Posts
  • Bookmarks/Blogroll
  • Categories
  • .. and so on..

Soon I’ll write a plugin which you can install, so you can access your wp data via XML right away. For the timebeing here’s a temporary solution:

  1. Download this file
  2. Extract the file in your theme (wordpress installation/wp-content/themes/themename)
  3. When navigating to your wp site/wp-content/themes/themename/xml.php you get the data you need.

This xml.php file isn’t optimized yet and there’s space for improvement! Modify it for your project needs. Hoops this helps you out ;)

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • YahooMyWeb

10 thoughts on “WordPress output to XML

  1. Thanks so much for posting this – haven’t tested it out yet but it looks just like what I’m after for a particular project. It’s a custom googlemap that get’s marker data from an xml file and I’m looking for a way to use wordpress as a CMS for these markers. Reckon with a bit of work this script could do the trick. Thanks again!

  2. This is just what I need. Simple too. Thanks.
    I don’t suppose there’s any way to run it through some kind of authorisation process, is there?

  3. goed werk Patrick,
    Ik vroeg me alleen af in hoeverre jij de mogelijkheden van wordpress laat intrigeren in flash.

  4. Door de XML output aan te zetten (settings>portfolio), kun je dit eenvoudig binnen je flash applicatie laden en parsen. Je kunt kiezen welke data je in de xml wilt hebben, enkel portfolio data of alle wordpress data (waaronder categorieën, pagina’s, posts, menu structuren en bookmarks/links). De screencast geeft een duidelijk beeld. Binnen kort komt er een grote update uit.

  5. Ok maar ‘XML output aan te zetten (settings>portfolio)’ is gerelateerd aan een plugin neem ik aan. Welke portfolio plugin bedoel je? of screencast.. Ik mis wat..
    groeten Bram

  6. ok duidelijk,, je info is gerelateerd aan wp simple plugin,
    zal ik strak is gaan bekijken

    groeten Bram

  7. Nice! ik ben benieuwd naar de plugin. Waarom heb je niet voor FlashPress gekozen? het is een beetje omslachtig via AMFPHP, maar het werkt wel oke op zich!

  8. Perfect solution for flash websites :) There is a confilct with qTranslate plugin, after commenting a line of code responsible for setting cookies everything works just perfect!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">