public GenericObject read() throws IOException
  {
    NodeList objects  = this.doc.getElementsByTagName("object");
    if (objects == null || objects.getLength() == 0)
      return null; // Keine Objekte in der Datei
    
    Node current = objects.item(pos++);
    
    if (current == null)
      return null; // Am Ende angekommen
    
    NamedNodeMap attributes = current.getAttributes();
    String type = attributes.getNamedItem("type").getNodeValue();
    String id   = attributes.getNamedItem("id").getNodeValue();
    
    HashMap values = new HashMap();
    NodeList list = current.getChildNodes();
    for (int i=0;i<list.getLength();++i)
    {
      Node n = list.item(i);

      if (n.getNodeType() != Node.ELEMENT_NODE)
        continue; // Ist kein Element. Ignorieren wir

      String name  = n.getNodeName();
      String vType = n.getAttributes().getNamedItem("type").getNodeValue();
      String value = null;
      try
      {
        value = n.getLastChild().getNodeValue();
      }
      catch (NullPointerException e)
      {
        // ignore
      }
      
      Value v = (Value) valueMap.get(vType);
      if (v == null) v = (Value) valueMap.get(null);
      
      values.put(name,v.unserialize(value));
    }
    try
    {
      return factory.create(type,id,values);
    }
    catch (IOException e)
    {
      throw e;
    }
    catch (Exception e2)
    {
      Logger.error("unable to create object " + type + ":" + id,e2);
      throw new IOException("unable to create object " + type + ":" + id);
    }
  }