# Suggestions for where to start importing an XML dump from Squarespace

**URL:** https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470
**Category:** Support
**Created:** [2016年十一月4日 03:19 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470 "2016-11-04T03:19:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![WhatNo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/whatno/32/121494_2.png) [@WhatNo](https://meta.discourse.org/u/WhatNo)
#### Post date: [2016年十一月4日 03:19 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/1 "2016-11-04T03:19:38Z")

</div>

Our legacy forum is implemented under Squarespace 5. I can export it as a giant XML dump, do you have any recommendations for which of the existing discourse import tools might be the most appropriate starting point ? I only need to pull in the basics like author, title, date, body – the structure is more like a blog than a forum so I’m hoping that’s going to make it easier…

Any ideas?  
Thanks!

---

<div class="post-metadata">

### Author: ![WhatNo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/whatno/32/121494_2.png) [@WhatNo](https://meta.discourse.org/u/WhatNo)
#### Post date: [2016年十一月5日 20:59 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/2 "2016-11-05T20:59:25Z")

</div>

Hi Greg, I’ve come from the future (it’s bleak by the way, don’t ask me who won the election 😬) and since you’re clearly clueless, (note to self: were you always this way?) here’s what I’d recommend:

1. Start by taking a look at [discourse/script/import\_scripts at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/tree/master/script/import_scripts). There’s close to 40 importers there, and while none of them will do what you need, you can see what’s possible and generally how it’s done.
2. You will notice they are all written in ruby. Remember how you learned ruby and thought it so amazingly great? You’re thinking at this point that it was developed by space creatures with no index fingers. Just breathe, it will come back to you over time.
3. Most of the importers are mysql based, they’re importing directly from source forum databases because many of them are trying to suck in as many of the suck-in-able features that can be sucked. Clearly this is not what you want to do, but you’ll also notice that most of the scripts spend their time transforming data from one concept to another – you’re going to have to do that as well, so you can find some helpful tips & tricks there – and especially see what valid data is _supposed_ to look like.
4. There are a handful of scripts that actually process **csv** and **xml** files. Specifically, have a look at the [Discus](https://github.com/discourse/discourse/blob/master/script/import_scripts/disqus.rb) importer. It’s so right for you in a lot of ways. More specifically look at the line `Nokogiri::XML::SAX::Parser.new(@parser)` – aaah? aaaaaaah??? Check out the [Nokogiri](http://www.nokogiri.org/) page too, as well, also. You’re going to like this brave new world.
5. As you’re going through the scripts, look for `def execute`, that’s going to give you a quick idea of how much that particular script is going to bite-off as well as what’s basically possible to import… all the way from:

 ![](https://global.discourse-cdn.com/meta/original/3X/b/3/b32401a81cabb36e5705ee5488d4c56002ad12bc.png)

down to something more your speed:

 ![](https://global.discourse-cdn.com/meta/original/3X/5/f/5fd87cdfd21e50ba36b26fa64043e108d10e5a8b.png)

- Check out [discourse/script/import\_scripts/bespoke\_1.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/script/import_scripts/bespoke_1.rb) for an example of **csv** handling. And even check out [discourse/script/import\_scripts/drupal\_json.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/script/import_scripts/drupal_json.rb) for an example of how to be a wuss and just load users because “_I’m so afawaid of bweaking something!_”

- Finally, you’re not going to find anything that’s just a giant bunch of scripted `INSERT` statements. So if you were hoping to leverage your awesome Excel and vi skills, it ain’t gonna happen (so maybe you should _submit_ one. Oh you’re so lazy, I forgot that about you).

That should get you pointed in the right direction. I’m off now to watch ☠[President Camacho’s State of the Union address](https://www.youtube.com/watch?v=sGUNPMPrxvA).☠_You worry too much!_

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2019年三月25日 10:14 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/3 "2019-03-25T10:14:05Z")

</div>



---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019年三月25日 23:11 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/4 "2019-03-25T23:11:45Z")

</div>

Hi Greg,

Curious what ended up happening here?

---

<div class="post-metadata">

### Author: ![WhatNo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/whatno/32/121494_2.png) [@WhatNo](https://meta.discourse.org/u/WhatNo)
#### Post date: [2019年三月26日 00:43 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/5 "2019-03-26T00:43:26Z")

</div>

Hi Sam, I got it basically working, through a mix of automated screen-scraping and whatever XML a squarespace backup coughs up, but I lost the UNIX image I was working on, and then the need for a solution evaporated a few months later anyway (they decided to just shutter the forum, not move it). So I don’t have any shareables.

HOWEVER, on a totally different tangent, they’re looking at replacing a bunch of sharepoint with a forum concept and I’ve told them they should definitely host with you – so if they actually decide to change, I’m sure they will. So there’s that.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2022年五月21日 22:59 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/6 "2022-05-21T22:59:17Z")

</div>



---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2022年五月22日 09:31 UTC](https://meta.discourse.org/t/suggestions-for-where-to-start-importing-an-xml-dump-from-squarespace/52470/7 "2022-05-22T09:31:02Z")

</div>


