Index: /applications/editors/josm/plugins/opendata/build.xml
===================================================================
--- /applications/editors/josm/plugins/opendata/build.xml	(revision 28020)
+++ /applications/editors/josm/plugins/opendata/build.xml	(revision 28021)
@@ -107,8 +107,17 @@
     <!--
     **********************************************************
+    ** compile_naptune - compiles Neptune classes
+    **********************************************************
+    -->
+    <target name="compile_neptune" depends="init">
+        <echo message="compiling Neptune ... "/>
+        <javac srcdir="includes/neptune" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" />
+    </target>
+    <!--
+    **********************************************************
     ** compile - compiles the source tree
     **********************************************************
     -->
-    <target name="compile" depends="init, compile_lang3, compile_poi, compile_jopendoc, compile_geotools">
+    <target name="compile" depends="init, compile_lang3, compile_poi, compile_jopendoc, compile_geotools, compile_neptune">
         <echo message="compiling sources for  ${plugin.jar} ... "/>
         <javac srcdir="src/org/openstreetmap" debug="true" destdir="${plugin.build.dir}" includeAntRuntime="false">
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java	(revision 28021)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NeptuneReader.java	(revision 28021)
@@ -0,0 +1,56 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io;
+
+import java.io.InputStream;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
+import neptune.ChouettePTNetworkType;
+
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.AbstractReader;
+import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
+
+public class NeptuneReader extends AbstractReader {
+
+	public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance) throws JAXBException {
+		return new NeptuneReader().parse(in, instance);
+		
+	}
+
+	protected static final <T> T unmarshal(Class<T> docClass, InputStream inputStream) throws JAXBException {
+		String packageName = docClass.getPackage().getName();
+		JAXBContext jc = JAXBContext.newInstance(packageName, NeptuneReader.class.getClassLoader());
+		Unmarshaller u = jc.createUnmarshaller();
+		JAXBElement<T> doc = (JAXBElement<T>)u.unmarshal(inputStream);
+		return doc.getValue();
+	}
+
+	private DataSet parse(InputStream in, ProgressMonitor instance) throws JAXBException {
+		ChouettePTNetworkType root = unmarshal(ChouettePTNetworkType.class, in);
+
+		System.out.println(root);
+		
+		// TODO
+		
+		return ds;
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/XmlImporter.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/XmlImporter.java	(revision 28020)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/XmlImporter.java	(revision 28021)
@@ -16,4 +16,12 @@
 package org.openstreetmap.josm.plugins.opendata.core.io;
 
+import java.io.InputStream;
+
+import javax.xml.bind.JAXBException;
+
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.IllegalDataException;
+
 public class XmlImporter extends AbstractImporter {
 
@@ -21,4 +29,14 @@
 		super(XML_FILE_FILTER);
 	}
-
+	
+	@Override
+	protected DataSet parseDataSet(InputStream in, ProgressMonitor instance)
+			throws IllegalDataException {
+		try {
+			// TODO: check it is a neptune file
+			return NeptuneReader.parseDataSet(in, handler, instance);
+		} catch (JAXBException e) {
+			throw new IllegalDataException(e);
+		}
+	}
 }
