Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Rees 17 posts 25 karma points
    Oct 16, 2009 @ 15:36
    Richard Rees
    0

    Export whole site to XML

    Hello All,

    My client wishes to export the entire content and structure of their umbraco site to one (or more) XML file(s). So I'm guessing the XML would mirror the node structure and for each node, it would give the URL's to any images and the html content for any node properties.

    Can anyone think of the easiest way to do this? The only way I can think of it is to write some .NET code that recursively traverses the content tree and for each node, extracts the content out of the properites for the corresponding document type.

    Has anyone else ever had to do this?

    Cheers

    Rich

     

  • Warren Buckley 2106 posts 4836 karma points MVP ∞ admin hq c-trib
    Oct 16, 2009 @ 15:39
    Warren Buckley
    4

    You could just give them the copy of the XML Cache of the nodes that can be found at /data/umbraco.config which is the XML file of your site.

    Hope this helps.

    Warren :)

  • Richard Rees 17 posts 25 karma points
    Oct 19, 2009 @ 11:21
    Richard Rees
    0

    That's almost EXACTLY what I'm looking for Warren. The only problem is images are only shown as an ID and not as a URL. I guess there's not much I can do about that is there?

  • Soeren Sprogoe 575 posts 259 karma points
    Oct 19, 2009 @ 11:38
    Soeren Sprogoe
    1

    Hi Richard,

    you can make a simple XSLT macro, that traverses all nodes and outputs them just the way you want it.Put the macro in an empty template, create a content node using that template, and you're flying.

    That way you can structure the XML exactly the way you want it, and apply formatting to the fields that you want formatted in a special way etc. etc.

    I've used this method very often for creating XML based product feeds to be integrated into external sites (fx. shopping portals). It takes a bit of work, but gives you complete control.

    Best regards,
    Soeren Sprogoe

Please Sign in or register to post replies

Write your reply to:

Draft