In QGIS 1.8 I used the openstreetmap plugin to request data from the server, or open a .osm XML file, which produced 3 layers (polygons, polylines and points) in QGIS.
This was great (give or take the 64bit bug which highly affects the freshly mapped area I work on), but how do I do that in QGIS 2.x?
I can't find any updated documentation about it.
In the vector menu, I've tried importing from osm servers, I get a .osm file, but then I'm stuck. There's a menu option for loading an XML file, but it produces a spatialite db, which apparently only has non-geometry tables when I try to add it as a spatialite layer.
If I open the attribute table, I can see node ids, ways and so on, but I can't figure out how to actually make use of them.
I've also tried adding a vector layer from a .osm XML file. I get a gpsbabel window that shows nothing, then finally an invalid data source message in QGIS.
Best Answer
Update for QGIS 3.x: The old OSM importer from QGIS 2 was dropped in QGIS 3 due to lots of unresolved bugs. The QuickOSM plugin also enables to read osm raw files. You can use user Layer - Add Layer - Add Vector Layer instead. In that case, OSM data are opened with GDAL as documented by http://gdal.org/drv_osm.html
In QGIS 2.x, There are 3 steps involved
The layer gets added to map, if you want all nodes, ways you can repeat step 3 with other options.
http://wiki.openstreetmap.org/wiki/QGIS#QGIS2_OpenStreetMap_Vectors