Get Metro Stations Coordinates

Hi guys,
First of all: I am completely new to Openstreetmap and I am looking forward to get more information.

I am trying to develop a very simple java program to query the OSM server.
Here is my problem:
I would like to simply get the latitude, longitude, name and line number of all the metro stations of Milan (Italy).
I have seen the map in the main page of Openstreetmap and they are all displayed.
I was wondering how to write a java program to query the DB and get all this information.
Is it possible ?
How can I access the data base ?
How can I do the query?

Thank you in advance !
Bye

xapi: the extended api lets you query for the tag railway=station(not sure if that is the correct tag look it up in map features )
the osm api lets you download history of those objects if you want to
osm list of tags tells you what you should search for. (this is called map features)

e.g. in xapi you can query like this:

 http://www.informationfreeway.org/api/0.5/node[railway=*][bbox=left,bottom,right,top]

I recommend using the osm export function (linking Rome here), to get the right bounding box, easy to use and graphical. You still need to copy coordinates from the input boxes.

Thank you emj !
I’ll try straightaway !

Please show us the results later on. :slight_smile: Would be fun to see what you are trying to do…