Apple publish the Xcode docset through RSS feeds, so Xcode can check and download them easily. If you are interested in retrieving the docsets directly, here is the catch:

Of course, this is valid for other docsets.