public static string GetXml(YvrFile yvr) { StringBuilder sb = new StringBuilder(); sb.AppendLine(XmlHeader); if (yvr?.Records != null) { VehicleRecordList.WriteXmlNode(yvr.Records, sb, 0); } return(sb.ToString()); }
public static YvrFile GetYvr(XmlDocument doc, string inputFolder = "") { YvrFile r = new YvrFile(); var node = doc.DocumentElement; if (node != null) { r.Records = VehicleRecordList.ReadXmlNode(node); } r.Name = Path.GetFileName(inputFolder); return(r); }