Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/14/08 21:51:15 (17 years ago)
Author:
gkronber
Message:

created a branch that uses XmlTextReader instead of XMLDocument to load documents. Investigating ticket #103. (...work in progress!)

Location:
branches/XmlTextReaderBranch
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/XmlTextReaderBranch/HeuristicLab.Operators/CombinedOperator.cs

    r89 r121  
    9696      return node;
    9797    }
    98     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
    99       base.Populate(node, restoredObjects);
    100       XmlNode descriptionNode = node.SelectSingleNode("Description");
    101       if (descriptionNode != null) myDescription = descriptionNode.InnerText;
    102       myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
     98    //public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
     99    //  base.Populate(node, restoredObjects);
     100    //  XmlNode descriptionNode = node.SelectSingleNode("Description");
     101    //  if(descriptionNode != null) myDescription = descriptionNode.InnerText;
     102    //  myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(node.SelectSingleNode("OperatorGraph"), restoredObjects);
     103    //}
     104    public override void Populate(XmlReader reader, IDictionary<Guid, IStorable> restoredObjects) {
     105      base.Populate(reader, restoredObjects);
     106      if(reader.IsStartElement() && reader.Name == "Description") {
     107        reader.ReadStartElement("Description");
     108        myDescription = reader.ReadString();
     109        reader.ReadEndElement();
     110      }
     111      myOperatorGraph = (IOperatorGraph)PersistenceManager.Restore(reader, "OperatorGraph", restoredObjects);
    103112    }
    104113    #endregion
Note: See TracChangeset for help on using the changeset viewer.