/// <summary>Convert the specified model to XML</summary> /// <param name="rootNode">The root model to serialise.</param> /// <returns>The XML</returns> public string WriteXML(ModelWrapper rootNode) { StringWriter s = new StringWriter(); APSIMFileWriter writer = new APSIMFileWriter(s); writer.Formatting = Formatting.Indented; XmlUtilities.SerialiseWithOptions(rootNode, false, null, null, writer); return(s.ToString()); }
/// <summary>Convert the specified model to XML</summary> /// <param name="rootNode">The root model to serialise.</param> /// <returns>The XML</returns> public string WriteXML(ModelWrapper rootNode) { StringWriter s = new StringWriter(); APSIMFileWriter writer = new APSIMFileWriter(s); writer.Formatting = Formatting.Indented; XmlUtilities.SerialiseWithOptions(rootNode, false, null, null, writer); return s.ToString(); }