[wp-hackers] Improving the XML export/import

Robert Deaton false.hopes at gmail.com
Mon Sep 25 23:19:30 GMT 2006


On 9/25/06, Matt Mullenweg <m at mullenweg.com> wrote:
> Robert Deaton wrote:
> > (1) Make it essentially a database dump, but in XML format. Include a
> > way to recreate the entire database schema as well as repopulate it
> > with XML. One main drawback of this is everyone will immediately ask
> > "Why do what the database backup plugin does over again in XML?"
> > Simple, its export. This means that the format should be database
> > agnostic, so that it can be imported into other systems, across
> > versions of WP, etc. I am particularly fond of this method.
>
> One thing I would like to see, which ties into this, is some filters for
> the dump.
>
> For example you might want just the posts from one author, or in one
> category.

We could easily copy/duplicate some of the code for doing the main
posts loop and create a set of filters that functions similarly if not
identically with an export_ prefix on the filter names.

> It might also make sense to add "id" attributes to elements in the XML
> that could have them, though we might have to namespace these to
> maintain RSS 2.0 compatibility.
>
> Category hierarchy.
>
> > (2) Keep the system as it is, adding hooks where necessary to allow
> > plugins to inject their own data where they need to to have it
> > exported. We also (imho) need to include some other information in the
> > exports which the above method would fix. Some things to include are
> > users, options, categories, links, etc.
>
> Hooks are a great idea.
>
> I'd just as soon leave out users and options.

Options I can [almost] imagine being left out. Its still kinda hard to
fathom, but I am beginning to be able to see it. Users, on the other
hand, I think would be a rather important thing to export, because
post_author can reference them, and so I think its important to have a
seperate index of the users.

-- 
--Robert Deaton


More information about the wp-hackers mailing list