Changeset 1616 for trunk/sources/HeuristicLab.Persistence/3.3/Default
- Timestamp:
- 04/21/09 15:34:44 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Persistence/3.3/Default
- Files:
-
- 7 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
r1612 r1616 41 41 try { 42 42 iterator = handlers[reader.Name].Invoke(); 43 } 44 catch (KeyNotFoundException) { 43 } catch (KeyNotFoundException) { 45 44 throw new InvalidOperationException(String.Format( 46 45 "No handler for XML tag \"{0}\" installed", … … 58 57 if (idString != null) 59 58 id = int.Parse(idString); 60 yield return new PrimitiveToken( 61 reader.GetAttribute("name"), 62 int.Parse(reader.GetAttribute("typeId")), 63 id, 64 new XmlString(reader.ReadString())); 59 string name = reader.GetAttribute("name"); 60 int typeId = int.Parse(reader.GetAttribute("typeId")); 61 XmlReader inner = reader.ReadSubtree(); 62 inner.Read(); 63 string xml = inner.ReadInnerXml(); 64 inner.Close(); 65 yield return new PrimitiveToken(name, typeId, id, new XmlString(xml)); 65 66 } 66 67 … … 123 124 XmlParser parser = new XmlParser( 124 125 new StreamReader(zipFile.GetInputStream(zipFile.GetEntry("data.xml")))); 125 return deSerializer.Deserialize(parser); 126 object result = deSerializer.Deserialize(parser); 127 zipFile.Close(); 128 return result; 126 129 } 127 130 }
Note: See TracChangeset
for help on using the changeset viewer.