public static List <ISOProcessDataVariable> ReadXML(XmlNodeList nodes)
        {
            List <ISOProcessDataVariable> items = new List <ISOProcessDataVariable>();

            foreach (XmlNode node in nodes)
            {
                items.Add(ISOProcessDataVariable.ReadXML(node));
            }
            return(items);
        }
        public static ISOProcessDataVariable ReadXML(XmlNode node)
        {
            ISOProcessDataVariable pdv = new ISOProcessDataVariable();

            pdv.ProcessDataDDI              = node.GetXmlNodeValue("@A");
            pdv.ProcessDataValue            = node.GetXmlNodeValueAsInt("@B");
            pdv.ProductIdRef                = node.GetXmlNodeValue("@C");
            pdv.DeviceElementIdRef          = node.GetXmlNodeValue("@D");
            pdv.ValuePresentationIdRef      = node.GetXmlNodeValue("@E");
            pdv.ActualCulturalPracticeValue = node.GetXmlNodeValueAsNullableInt("@F");
            pdv.ElementTypeInstanceValue    = node.GetXmlNodeValueAsNullableInt("@G");

            XmlNodeList pdvNodes = node.SelectNodes("PDV");

            if (pdvNodes != null)
            {
                pdv.ChildProcessDataVariables.AddRange(ISOProcessDataVariable.ReadXML(pdvNodes));
            }

            return(pdv);
        }
Example #3
0
        public static ISOTreatmentZone ReadXML(XmlNode tznNode)
        {
            ISOTreatmentZone treatmentZone = new ISOTreatmentZone();

            treatmentZone.TreatmentZoneCode       = tznNode.GetXmlNodeValueAsByte("@A");
            treatmentZone.TreatmentZoneDesignator = tznNode.GetXmlNodeValue("@B");
            treatmentZone.TreatmentZoneColour     = tznNode.GetXmlNodeValueAsNullableByte("@C");

            XmlNodeList pdvNodes = tznNode.SelectNodes("PDV");

            if (pdvNodes != null)
            {
                treatmentZone.ProcessDataVariables.AddRange(ISOProcessDataVariable.ReadXML(pdvNodes));
            }

            XmlNodeList plnNodes = tznNode.SelectNodes("PLN");

            if (plnNodes != null)
            {
                treatmentZone.Polygons.AddRange(ISOPolygon.ReadXML(plnNodes));
            }
            return(treatmentZone);
        }