Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/HeuristicLab.Problems.RoutePlanning.csproj
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/HeuristicLab.Problems.RoutePlanning.csproj	(revision 8291)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/HeuristicLab.Problems.RoutePlanning.csproj	(revision 8293)
@@ -56,4 +56,6 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Osm.Data\XmlDataSource.cs" />
+    <Compile Include="Osm\IDataSource.cs" />
     <Compile Include="Osm\Node.cs" />
     <Compile Include="Osm\OsmBase.cs" />
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm.Data/XmlDataSource.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm.Data/XmlDataSource.cs	(revision 8293)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm.Data/XmlDataSource.cs	(revision 8293)
@@ -0,0 +1,173 @@
+﻿
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+namespace HeuristicLab.Problems.RoutePlanning.Osm.Data {
+  public class XmlDataSource : IDataSource {
+    private FileInfo file;
+
+    private IDictionary<long, Node> nodes;
+    private IDictionary<long, Way> ways;
+    private IDictionary<long, Relation> relations;
+
+
+    #region Properties
+
+    public bool IsReadOnly {
+      get {
+        if (file.Exists && file.IsReadOnly) {
+          return true;
+        }
+        return false;
+      }
+    }
+
+    public string Name {
+      get { return file.Name; }
+    }
+
+    #endregion
+
+    #region Constructors
+
+    public XmlDataSource(string filename) {
+      file = new FileInfo(filename);
+
+      nodes = new Dictionary<long, Node>();
+      ways = new Dictionary<long, Way>();
+      relations = new Dictionary<long, Relation>();
+
+      ReadData();
+    }
+
+    #endregion
+
+    #region Public Methods
+
+    public Node GetNode(long nodeId) {
+      if (nodes.ContainsKey(nodeId)) {
+        return nodes[nodeId];
+      }
+      return null;
+    }
+
+    public Way GetWay(long wayId) {
+      if (ways.ContainsKey(wayId)) {
+        return ways[wayId];
+      }
+      return null;
+    }
+
+    public Relation GetRelation(long relationId) {
+      if (relations.ContainsKey(relationId)) {
+        return relations[relationId];
+      }
+      return null;
+    }
+
+    #endregion
+
+    private void ReadData() {
+      XmlReaderSettings settings = new XmlReaderSettings();
+      settings.IgnoreComments = true;
+      settings.IgnoreWhitespace = true;
+
+      using (XmlReader reader = XmlReader.Create(file.FullName, settings)) {
+        reader.ReadStartElement("osm");
+        reader.ReadStartElement("bounds");
+        while (reader.LocalName.Equals("node")) {
+          Node node = new Node();
+
+          double lat = XmlConvert.ToDouble(reader.GetAttribute("lat"));
+          double lon = XmlConvert.ToDouble(reader.GetAttribute("lon"));
+
+          GetBaseAttributes(reader, node);
+          node.Latitude = lat;
+          node.Longitude = lon;
+
+          reader.Read();
+          if (reader.LocalName.Equals("tag")) {
+            while (reader.LocalName.Equals("tag")) {
+              string key = reader.GetAttribute("k");
+              string value = reader.GetAttribute("v");
+              node.Tags.Add(key, value);
+              reader.Read();
+            }
+            reader.Read();
+          }
+
+          nodes.Add(node.Id, node);
+        }
+        while (reader.LocalName.Equals("way")) {
+          Way way = new Way();
+          GetBaseAttributes(reader, way);
+          reader.Read();
+          while (reader.LocalName.Equals("nd") || reader.LocalName.Equals("tag")) {
+            if (reader.LocalName.Equals("nd")) {
+              long refNodeId = XmlConvert.ToInt64(reader.GetAttribute("ref"));
+              way.Nodes.Add(GetNode(refNodeId));
+
+            } else if (reader.LocalName.Equals("tag")) {
+              string key = reader.GetAttribute("k");
+              string value = reader.GetAttribute("v");
+              way.Tags.Add(key, value);
+            }
+            reader.Read();
+          }
+
+          ways.Add(way.Id, way);
+
+          reader.Read();
+        }
+        while (reader.LocalName.Equals("relation")) {
+          Relation relation = new Relation();
+          GetBaseAttributes(reader, relation);
+
+          reader.Read();
+          while (reader.LocalName.Equals("member") || reader.LocalName.Equals("tag")) {
+            if (reader.LocalName.Equals("member")) {
+              string type = reader.GetAttribute("type");
+              long refNodeId = XmlConvert.ToInt64(reader.GetAttribute("ref"));
+              string role = reader.GetAttribute("role");
+              RelationMember member = new RelationMember();
+              member.Role = role;
+              if (type == "node") {
+                member.Member = GetNode(refNodeId);
+              } else if (type == "way") {
+                member.Member = GetWay(refNodeId);
+              }
+              relation.Members.Add(member);
+            } else if (reader.LocalName.Equals("tag")) {
+              string key = reader.GetAttribute("k");
+              string value = reader.GetAttribute("v");
+              relation.Tags.Add(key, value);
+            }
+            reader.Read();
+          }
+
+          relations.Add(relation.Id, relation);
+
+          reader.Read();
+        }
+        reader.Close();
+      }
+    }
+
+    private void GetBaseAttributes(XmlReader reader, OsmBase obj) {
+      obj.Id = XmlConvert.ToInt64(reader.GetAttribute("id"));
+      //Console.WriteLine("id:" + obj.Id);
+
+      if (reader.GetAttribute("user") != null) {
+        obj.User = reader.GetAttribute("user");
+      }
+      if (reader.GetAttribute("uid") != null) {
+        obj.UserId = XmlConvert.ToInt32(reader.GetAttribute("uid"));
+      }
+      obj.Visible = XmlConvert.ToBoolean(reader.GetAttribute("visible"));
+      obj.Version = XmlConvert.ToInt32(reader.GetAttribute("version"));
+      obj.Changeset = XmlConvert.ToInt64(reader.GetAttribute("changeset"));
+      obj.Timestamp = XmlConvert.ToDateTime(reader.GetAttribute("timestamp"), XmlDateTimeSerializationMode.Utc);
+
+    }
+  }
+}
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/IDataSource.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/IDataSource.cs	(revision 8293)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/IDataSource.cs	(revision 8293)
@@ -0,0 +1,9 @@
+﻿
+namespace HeuristicLab.Problems.RoutePlanning.Osm {
+  public interface IDataSource {
+    //string Name { get; }
+    Node GetNode(long nodeId);
+    Way GetWay(long wayId);
+    Relation GetRelation(long relationId);
+  }
+}
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Node.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Node.cs	(revision 8291)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Node.cs	(revision 8293)
@@ -13,5 +13,9 @@
     }
 
-    public Node(int id, double lat, double lon)
+    public Node() {
+      point = new PointD();
+    }
+
+    public Node(long id, double lat, double lon)
       : base(id) {
       point = new PointD(lat, lon);
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/OsmBase.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/OsmBase.cs	(revision 8291)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/OsmBase.cs	(revision 8293)
@@ -4,14 +4,18 @@
 namespace HeuristicLab.Problems.RoutePlanning.Osm {
   public abstract class OsmBase {
-    public int Id { get; set; }
+    public long Id { get; set; }
     public string User { get; set; }
     public int UserId { get; set; }
     public DateTime Timestamp { get; set; }
-    public int Changeset { get; set; }
+    public long Changeset { get; set; }
     public int Version { get; set; }
     public bool Visible { get; set; }
     public IDictionary<string, string> Tags { get; set; }
 
-    public OsmBase(int id) {
+    public OsmBase() {
+      Tags = new Dictionary<string, string>();
+    }
+
+    public OsmBase(long id) {
       Id = id;
       Tags = new Dictionary<string, string>();
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Relation.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Relation.cs	(revision 8291)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Relation.cs	(revision 8293)
@@ -5,5 +5,9 @@
     private List<RelationMember> members;
 
-    public Relation(int id)
+    public Relation() {
+      members = new List<RelationMember>();
+    }
+
+    public Relation(long id)
       : base(id) {
       members = new List<RelationMember>();
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Way.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Way.cs	(revision 8291)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Way.cs	(revision 8293)
@@ -39,5 +39,9 @@
     private List<Node> nodes;
 
-    public Way(int id)
+    public Way() {
+      nodes = new List<Node>();
+    }
+
+    public Way(long id)
       : base(id) {
       nodes = new List<Node>();
