/// <summary> /// Save the object to XML. /// </summary> /// <param name="encogObject">The object to save.</param> /// <param name="xmlOut">The XML writer.</param> public void Save(IEncogPersistedObject encogObject, WriteXML xmlOut) { this.xmlOut = xmlOut; PersistorUtil.BeginEncogObject(encogObject.GetType().Name , xmlOut, encogObject, true); this.tagger.Analyze(encogObject); foreach (FieldInfo childField in ReflectionUtil .GetAllFields(encogObject.GetType())) { if (ReflectionUtil.ShouldAccessField(childField, true)) { Object childValue = childField.GetValue(encogObject); xmlOut.BeginTag(childField.Name); SaveField(childValue); xmlOut.EndTag(); } } xmlOut.EndTag(); }