public static ISOTime ReadXML(XmlNode node) { ISOTime time = new ISOTime(); time.Start = node.GetXmlNodeValueAsNullableDateTime("@A"); time.Stop = node.GetXmlNodeValueAsNullableDateTime("@B"); time.Duration = node.GetXmlNodeValueAsNullableUInt("@C"); time.TypeInt = node.GetXmlNodeValueAsInt("@D"); time.HasStart = node.IsAttributePresent("A"); time.HasStop = node.IsAttributePresent("B"); time.HasDuration = node.IsAttributePresent("C"); time.HasType = node.IsAttributePresent("D"); XmlNodeList ptnNodes = node.SelectNodes("PTN"); if (ptnNodes != null) { time.Positions.AddRange(ISOPosition.ReadXML(ptnNodes)); } XmlNodeList dlvNodes = node.SelectNodes("DLV"); if (dlvNodes != null) { time.DataLogValues.AddRange(ISODataLogValue.ReadXML(dlvNodes)); } return(time); }
public static List <ISOPosition> ReadXML(XmlNodeList nodes) { List <ISOPosition> items = new List <ISOPosition>(); foreach (XmlNode node in nodes) { items.Add(ISOPosition.ReadXML(node)); } return(items); }
public static ISOAllocationStamp ReadXML(XmlNode node) { if (node == null) { return(null); } ISOAllocationStamp item = new ISOAllocationStamp(); item.Start = node.GetXmlNodeValueAsNullableDateTime("@A"); item.Stop = node.GetXmlNodeValueAsNullableDateTime("@B"); item.Duration = node.GetXmlNodeValueAsNullableUInt("@C"); item.TypeInt = node.GetXmlNodeValueAsInt("@D"); XmlNodeList ptnNodes = node.SelectNodes("PTN"); if (ptnNodes != null) { item.Positions.AddRange(ISOPosition.ReadXML(ptnNodes)); } return(item); }