New version v5.9.0 import feed functionality includes importing categories automatically from category paths in XML files:
<category>Home>Clothes>Men</category> OR <category>Home|Clothes|Men</category>
will import all missing categories so products are inserted into their category accordingly. (category path separator is configurable)
.png.022b5452a8f28f552bc9430097a16da2.png)