public class StationMappingMain {
public static void main(String[] args) throws Exception {
JAXBContext context = JAXBContext.newInstance("uk.org.naptan");
Unmarshaller unmarshaller = context.createUnmarshaller();
NaPTAN result = (NaPTAN) unmarshaller.unmarshal(new File(
"/Users/bdferris/Documents/uk-rail/naptan/NaPTAN.xml"));
PrintWriter writer = new PrintWriter(new File(
"/Users/bdferris/Documents/uk-rail/naptan/stations.xml"));
writer.println("tiploc,lat,lon");
StopPointsStructure stopPoints = result.getStopPoints();
int i = 0;
for (StopPointStructure stopPoint : stopPoints.getStopPoint()) {
String tiploc = getTiplocForStopPoint(stopPoint);
Double lat = getLatForStopPoint(stopPoint);
Double lon = getLonForStopPoint(stopPoint);