public void Serialize(XmlNode nodParent) { XmlNode nodMA = nodParent.AppendChild(nodParent.OwnerDocument.CreateElement("MorphologicalAnalysis")); nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Name")).InnerText = Name; nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Folder")).InnerText = ProjectManager.Project.GetRelativePath(OutputFolder.FullName); nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Porosity")).InnerText = Porosity.ToString(CultureInfo.InvariantCulture); nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Density")).InnerText = Density.ToString(CultureInfo.InvariantCulture); nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Competency")).InnerText = Competency.ToString(CultureInfo.InvariantCulture); nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Spreadsheet")).InnerText = ProjectManager.Project.GetRelativePath(Spreadsheet); XmlNode nodDuration = nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("Duration")); nodDuration.InnerText = Duration.As(DisplayUnits_Duration).ToString("R", CultureInfo.InvariantCulture); nodDuration.Attributes.Append(nodParent.OwnerDocument.CreateAttribute("units")).InnerText = DisplayUnits_Duration.ToString(); XmlNode nodMinFluxCell = nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("MinimumFluxUnit")); if (BoundaryFluxUnit != null) { nodMinFluxCell.InnerText = BoundaryFluxUnit.Name; } XmlNode nodMinFlux = nodMA.AppendChild(nodParent.OwnerDocument.CreateElement("MinimumFluxVolume")); nodMinFlux.InnerText = BoundaryFlux.As(ProjectManager.Project.Units.VolUnit).ToString("R", CultureInfo.InvariantCulture); }