Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/ViewOnly/ViewOnlyFormat.cs	(revision 1564)
@@ -9,47 +9,44 @@
 namespace HeuristicLab.Persistence.Default.ViewOnly {
 
-  public class ViewOnlyFormat : FormatBase {
-    public override string Name { get { return "ViewOnly"; } }
-    public static ViewOnlyFormat Instance = new ViewOnlyFormat();
+  public class String : ISerialData {
+    public string Data { get; set; }
+    public String(string s) {
+      Data = s;
+    }
   }
 
-  public abstract class ValueType2ViewFormatter : IFormatter {
-    public abstract Type Type { get; }
-    public IFormat Format { get { return ViewOnlyFormat.Instance; } }
-    public object DoFormat(object o) { return o; }
-    public object Parse(object o) {
+  public class ViewOnlyFormat : FormatBase<String> {
+    public override string Name { get { return "ViewOnly"; } }    
+  }
+
+  public abstract class ValueType2ViewFormatterBase<T> : FormatterBase<T, String> {
+    public override String Format(T o) { return new String(o.ToString()); }
+    public override T Parse(String s) {
       throw new NotImplementedException();
     }
   }
 
-  public class String2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(string); } }
-  }
+  [EmptyStorableClass]
+  public class String2ViewFormatter : ValueType2ViewFormatterBase<string> { }
 
-  public class Bool2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(bool); } }
-  }
+  [EmptyStorableClass]
+  public class Bool2ViewFormatter : ValueType2ViewFormatterBase<bool> { }
 
-  public class Int2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(int); } }
-  }
+  [EmptyStorableClass]
+  public class Int2ViewFormatter : ValueType2ViewFormatterBase<int> { }
 
-  public class Double2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(double); } }
-  }
+  [EmptyStorableClass]
+  public class Double2ViewFormatter : ValueType2ViewFormatterBase<double> { }
 
-  public class DateTime2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(DateTime); } }
-  }
+  [EmptyStorableClass]
+  public class DateTime2ViewFormatter : ValueType2ViewFormatterBase<DateTime> { }
 
-  public class Type2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(Type); } }
-  }
+  [EmptyStorableClass]
+  public class Type2ViewFormatter : ValueType2ViewFormatterBase<Type> { }
 
-  public class Float2ViewFormatter : ValueType2ViewFormatter {
-    public override Type Type { get { return typeof(float); } }
-  }
-
-  public class ViewOnlyGenerator : Generator<string> {
+  [EmptyStorableClass]
+  public class Float2ViewFormatter : ValueType2ViewFormatterBase<float> { }
+    
+  public class ViewOnlyGenerator : GeneratorBase<string> {
 
     private bool isSepReq;
@@ -98,5 +95,5 @@
         sb.Append('=');
       }
-      sb.Append(primitiveToken.SerialData);
+      sb.Append(((String)primitiveToken.SerialData).Data);
       isSepReq = true;      
       return sb.ToString();  
@@ -140,5 +137,5 @@
 
     public static string Serialize(object o) {
-      return Serialize(o, ConfigurationService.Instance.GetDefaultConfig(ViewOnlyFormat.Instance));
+      return Serialize(o, ConfigurationService.Instance.GetDefaultConfig(new ViewOnlyFormat()));
     }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlFormatters.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlFormatters.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlFormatters.cs	(revision 1564)
@@ -4,14 +4,7 @@
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
-
-  [EmptyStorableClass]
-  public class DoubleArray2XmlFormatter : NumberArray2XmlFormatterBase {
-
-    public override Type Type {
-      get {
-        return typeof(double[]);
-      }
-    }
-
+  
+  public abstract class DoubleArray2XmlFormatterBase<T> : NumberArray2XmlFormatterBase<T> {
+    
     protected override string FormatValue(object o) {
       return ((double)o).ToString("r", CultureInfo.InvariantCulture);
@@ -24,20 +17,12 @@
 
   [EmptyStorableClass]
-  public class Double2DArray2XmlFormatter : DoubleArray2XmlFormatter {
-    public override Type Type {
-      get {
-        return typeof(double[,]);
-      }
-    }
-  }
+  public class Double1DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[]> { }
+
 
   [EmptyStorableClass]
-  public class Double3DArray2XmlFormatter : DoubleArray2XmlFormatter {
-    public override Type Type {
-      get {
-        return typeof(double[, ,]);
-      }
-    }
-  }
+  public class Double2DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[,]> { }
+
+  [EmptyStorableClass]
+  public class Double3DArray2XmlFormatter : DoubleArray2XmlFormatterBase<double[,,]> { }
   
 }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlFormatter.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlFormatter.cs	(revision 1564)
@@ -8,11 +8,5 @@
 
   [EmptyStorableClass]
-  public class DoubleList2XmlFormatter : NumberEnumeration2XmlFormatterBase {
-
-    public override Type Type {
-      get {
-        return typeof(List<double>);
-      }
-    }
+  public class DoubleList2XmlFormatter : NumberEnumeration2XmlFormatterBase<List<double>> {    
 
     protected override void Add(IEnumerable enumeration, object o) {
@@ -20,5 +14,5 @@
     }
 
-    protected override object Instantiate() {
+    protected override IEnumerable Instantiate() {
       return new List<double>();
     }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlFormatters.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlFormatters.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlFormatters.cs	(revision 1564)
@@ -3,13 +3,6 @@
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
-
-  [EmptyStorableClass]
-  public class IntArray2XmlFormatter : NumberArray2XmlFormatterBase {
-
-    public override Type Type {
-      get {
-        return typeof(int[]);
-      }
-    }
+  
+  public abstract class IntArray2XmlFormatterBase<T> : NumberArray2XmlFormatterBase<T> {    
 
     protected override string FormatValue(object o) {
@@ -22,23 +15,12 @@
   }
 
+  [EmptyStorableClass]
+  public class Int1DArray2XmlFormatter : IntArray2XmlFormatterBase<int[]> { }
 
   [EmptyStorableClass]
-  public class Int2DArray2XmlFormatter : IntArray2XmlFormatter {
-    public override Type Type {
-      get {
-        return typeof(int[,]);
-      }
-    }
-  }
-
+  public class Int2DArray2XmlFormatter : IntArray2XmlFormatterBase<int[,]> { }
 
   [EmptyStorableClass]
-  public class Int3DArray2XmlFormatter : IntArray2XmlFormatter {
-    public override Type Type {
-      get {
-        return typeof(int[, ,]);
-      }
-    }
-  }
+  public class Int3DArray2XmlFormatter : IntArray2XmlFormatterBase<int[,,]> { }
   
 }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlFormatter.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlFormatter.cs	(revision 1564)
@@ -7,17 +7,11 @@
 
   [EmptyStorableClass]
-  public class IntList2XmlFormatter : NumberEnumeration2XmlFormatterBase {
-
-    public override Type Type {
-      get {
-        return typeof(List<int>);
-      }
-    }
-
+  public class IntList2XmlFormatter : NumberEnumeration2XmlFormatterBase<List<int>> {
+    
     protected override void Add(IEnumerable enumeration, object o) {
       ((List<int>)enumeration).Add((int)o);
     }
 
-    protected override object Instantiate() {
+    protected override IEnumerable Instantiate() {
       return new List<int>();
     }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlFormatterBase.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlFormatterBase.cs	(revision 1564)
@@ -6,14 +6,13 @@
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
                                                               
-  public abstract class NumberArray2XmlFormatterBase : IFormatter {
+  public abstract class NumberArray2XmlFormatterBase<T> : FormatterBase<T, XmlString> {
 
-    public abstract Type Type { get; }
-    public IFormat Format { get { return XmlFormat.Instance; } }
     protected virtual string Separator { get { return ";"; } }
     protected abstract string FormatValue(object o);
     protected abstract object ParseValue(string o);
 
-    public object DoFormat(object obj) {
-      Array a = (Array)obj;
+    public override XmlString Format(T t) {
+      object o = (object)t;
+      Array a = (Array)o;
       int[] lengths = new int[a.Rank];
       int[] lowerBounds = new int[a.Rank];
@@ -44,11 +43,10 @@
         }
       }      
-      return sb.ToString();
+      return new XmlString(sb.ToString());
     }
 
-    public object Parse(object o) {
+    public override T Parse(XmlString x) {
       IEnumerator values =
-        ((string)o)
-        .Split(new[] { Separator },
+        x.Data.Split(new[] { Separator },
         StringSplitOptions.RemoveEmptyEntries).GetEnumerator();
       values.MoveNext();
@@ -64,5 +62,5 @@
         lowerBounds[i] = int.Parse((string)values.Current);
       }
-      Array a = Array.CreateInstance(this.Type.GetElementType(), lengths, lowerBounds);
+      Array a = Array.CreateInstance(this.SourceType.GetElementType(), lengths, lowerBounds);
       int[] positions = new int[rank];
       while (values.MoveNext()) {
@@ -78,5 +76,6 @@
         }
       }
-      return a;
+      object o = a;
+      return (T)o;
     }
   }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlFormatterBase.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlFormatterBase.cs	(revision 1564)
@@ -6,30 +6,28 @@
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
   
-  public abstract class NumberEnumeration2XmlFormatterBase : IFormatter {
+  public abstract class NumberEnumeration2XmlFormatterBase<T> : FormatterBase<T, XmlString> where T : IEnumerable {
 
-    public abstract Type Type { get; }
-    public IFormat Format { get { return XmlFormat.Instance; } }
     protected virtual string Separator { get { return ";"; } }
     protected abstract void Add(IEnumerable enumeration, object o);
-    protected abstract object Instantiate();
+    protected abstract IEnumerable Instantiate();
     protected abstract string FormatValue(object o);
     protected abstract object ParseValue(string o);
 
-    public object DoFormat(object o) {
+    public override XmlString Format(T t) {
       StringBuilder sb = new StringBuilder();
-      foreach (var value in (IEnumerable)o) {
+      foreach (var value in (IEnumerable)t) {
         sb.Append(FormatValue(value));
         sb.Append(Separator);
       }
-      return sb.ToString();
+      return new XmlString(sb.ToString());
     }
 
-    public object Parse(object o) {
-      IEnumerable enumeration = (IEnumerable)Instantiate();
-      string[] values = ((string)o).Split(new[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
+    public override T Parse(XmlString x) {
+      IEnumerable enumeration = Instantiate();
+      string[] values = x.Data.Split(new[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
       foreach (var value in values) {
         Add(enumeration, ParseValue(value));
       }
-      return enumeration;
+      return (T)enumeration;
     }
   }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlFormatter.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlFormatter.cs	(revision 1564)
@@ -6,15 +6,12 @@
 
   [EmptyStorableClass]
-  public class DateTime2XmlFormatter : IFormatter {    
-
-    public Type Type { get { return typeof(DateTime); } }
-    public IFormat Format { get { return XmlFormat.Instance; } }  
-
-    public object DoFormat(object o) {
-      return ((DateTime)o).Ticks.ToString();      
+  public class DateTime2XmlFormatter : FormatterBase<DateTime, XmlString> {    
+    
+    public override XmlString Format(DateTime dt) {
+      return new XmlString(dt.Ticks.ToString());      
     }
 
-    public object Parse(object o) {
-      return new DateTime(long.Parse((string)o));
+    public override DateTime Parse(XmlString x) {
+      return new DateTime(long.Parse(x.Data));
     }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlFormatterBase.cs	(revision 1564)
@@ -7,10 +7,6 @@
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
   
-  public abstract class DecimalNumber2XmlFormatterBase<T> : IFormatter {
-
-    public Type Type { get { return typeof(T); } }
-
-    public IFormat Format { get { return XmlFormat.Instance; } }
-
+  public abstract class DecimalNumber2XmlFormatterBase<T> : FormatterBase<T, XmlString> {
+    
     private static MethodInfo ToStringMethod = typeof(T)
       .GetMethod(
@@ -31,9 +27,9 @@
         null);
 
-    public object DoFormat(object o) {
-      return ToStringMethod.Invoke(o, new object[] { "r", CultureInfo.InvariantCulture });
+    public override XmlString Format(T t) {
+      return new XmlString((string)ToStringMethod.Invoke(t, new object[] { "r", CultureInfo.InvariantCulture }));
     }
-    public object Parse(object o) {      
-      return ParseMethod.Invoke(null, new[] { o, CultureInfo.InvariantCulture });
+    public override T Parse(XmlString x) {      
+      return (T)ParseMethod.Invoke(null, new object[] { x.Data, CultureInfo.InvariantCulture });
     }
   }  
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlFormatterBase.cs	(revision 1564)
@@ -7,9 +7,5 @@
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {  
 
-  public abstract class SimpleNumber2XmlFormatterBase<T> : IFormatter {
-
-    public Type Type { get { return typeof(T); } }
-
-    public IFormat Format { get { return XmlFormat.Instance; } }
+  public abstract class SimpleNumber2XmlFormatterBase<T> : FormatterBase<T, XmlString> {
 
     private static MethodInfo ParseMethod = typeof(T)
@@ -22,9 +18,9 @@
         null);
 
-    public object DoFormat(object o) {
-      return ((T)o).ToString();
+    public override XmlString Format(T t) {
+      return new XmlString(t.ToString());
     }
-    public object Parse(object o) {
-      return ParseMethod.Invoke(null, new[] { o });      
+    public override T Parse(XmlString x) {
+      return (T)ParseMethod.Invoke(null, new[] { x.Data });      
     }
   }  
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlFormatter.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlFormatter.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlFormatter.cs	(revision 1564)
@@ -8,19 +8,19 @@
 
   [EmptyStorableClass]
-  public class String2XmlFormatter : IFormatter {
-
-    public Type Type { get { return typeof(string); } }
-    public IFormat Format { get { return XmlFormat.Instance;  } }
-
-    public object DoFormat(object o) {      
-      return "<![CDATA[" +
-        ((string)o).Replace("]]>", "]]]]><![CDATA[>") +
-        "]]>";
+  public class String2XmlFormatter : FormatterBase<string, XmlString> {
+    
+    public override XmlString Format(string s) {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("<![CDATA[");
+      sb.Append(s.Replace("]]>", "]]]]><![CDATA[>"));
+      sb.Append("]]>");
+      return new XmlString(sb.ToString());  
     }
 
-    public object Parse(object o) {
+    private static readonly string[] separators = new string[] { "<![CDATA[", "]]>" };
+
+    public override string Parse(XmlString x) {
       StringBuilder sb = new StringBuilder();
-      foreach (string s in ((string)o).Split(
-        new[] { "<![CDATA[", "]]>" },
+      foreach (string s in x.Data.Split(separators,        
         StringSplitOptions.RemoveEmptyEntries)) {
         sb.Append(s);
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs	(revision 1564)
@@ -5,8 +5,6 @@
 
   [EmptyStorableClass]
-  public class XmlFormat : FormatBase {
-    public override string Name { get { return "XML"; } }
-    public static readonly XmlFormat Instance = new XmlFormat();
-    private XmlFormat() { }
+  public class XmlFormat : FormatBase<XmlString> {
+    public override string Name { get { return "XML"; } }    
   }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 1564)
@@ -21,34 +21,6 @@
     public const string METAINFO = "METAINFO";
   }
-
-  public abstract class Generator<T> {
-    public T Format(ISerializationToken token) {
-      Type type = token.GetType();
-      if (type == typeof(BeginToken))
-        return Format((BeginToken)token);
-      if (type == typeof(EndToken))
-        return Format((EndToken)token);
-      if (type == typeof(PrimitiveToken))
-        return Format((PrimitiveToken)token);
-      if (type == typeof(ReferenceToken))
-        return Format((ReferenceToken)token);
-      if (type == typeof(NullReferenceToken))
-        return Format((NullReferenceToken)token);
-      if (type == typeof(MetaInfoBeginToken))
-        return Format((MetaInfoBeginToken)token);
-      if (type == typeof(MetaInfoEndToken))
-        return Format((MetaInfoEndToken)token);
-      throw new ApplicationException("Invalid token of type " + type.FullName);
-    }
-    protected abstract T Format(BeginToken beginToken);
-    protected abstract T Format(EndToken endToken);
-    protected abstract T Format(PrimitiveToken primitiveToken);
-    protected abstract T Format(ReferenceToken referenceToken);
-    protected abstract T Format(NullReferenceToken nullReferenceToken);
-    protected abstract T Format(MetaInfoBeginToken metaInfoBeginToken);
-    protected abstract T Format(MetaInfoEndToken metaInfoEndToken);
-  }
-
-  public class XmlGenerator : Generator<string> {
+  
+  public class XmlGenerator : GeneratorBase<string> {
     
     private int depth;
@@ -117,5 +89,5 @@
       return Prefix +
         FormatNode(XmlStrings.PRIMITIVE, attributes, NodeType.Start) +
-        dataToken.SerialData + "</" + XmlStrings.PRIMITIVE + ">\r\n";      
+        ((XmlString)dataToken.SerialData).Data + "</" + XmlStrings.PRIMITIVE + ">\r\n";      
     }
 
@@ -134,5 +106,5 @@
 
     protected override string Format(MetaInfoBeginToken metaInfoBeginToken) {
-      string result = Prefix + "<" + XmlStrings.METAINFO + ">";
+      string result = Prefix + "<" + XmlStrings.METAINFO + ">\r\n";
       depth += 1;
       return result;
@@ -141,5 +113,5 @@
     protected override string Format(MetaInfoEndToken metaInfoEndToken) {
       depth -= 1;
-      return Prefix + "</" + XmlStrings.METAINFO + ">";
+      return Prefix + "</" + XmlStrings.METAINFO + ">\r\n";
     }
 
@@ -156,5 +128,5 @@
 
     public static void Serialize(object o, string filename) {      
-      Serialize(o, filename, ConfigurationService.Instance.GetDefaultConfig(XmlFormat.Instance));
+      Serialize(o, filename, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()));
     }
 
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 1563)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 1564)
@@ -62,5 +62,5 @@
         int.Parse(reader.GetAttribute("typeId")),
         id,
-        reader.ReadString());        
+        new XmlString(reader.ReadString()));
     }
 
@@ -69,8 +69,7 @@
       string idString = reader.GetAttribute("id");
       int? id = null;
-      int? typeId = null;
       if (idString != null)
         id = int.Parse(idString);
-        typeId = int.Parse(reader.GetAttribute("typeId"));
+      int typeId = int.Parse(reader.GetAttribute("typeId"));
       yield return new BeginToken(name, typeId, id);
       IEnumerator<ISerializationToken> iterator = GetEnumerator();
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs	(revision 1564)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs	(revision 1564)
@@ -0,0 +1,15 @@
+﻿using HeuristicLab.Persistence.Interfaces;
+using HeuristicLab.Persistence.Core;
+
+namespace HeuristicLab.Persistence.Default.Xml {
+  
+  public class XmlString : ISerialData {
+
+    [Storable]
+    public string Data { get; private set; }
+
+    public XmlString(string data) {
+      Data = data;
+    }
+  }
+}
