Ejemplo n.º 1
0
        public static SOPVehicle FromXml2(string text)
        {
            if (text == String.Empty)
            {
                return(null);
            }

            UTF8Encoding  enc     = new UTF8Encoding();
            MemoryStream  ms      = new MemoryStream(enc.GetBytes(text));
            XmlTextReader xreader = new XmlTextReader(ms);

            SOPVehicle v = new SOPVehicle();
            bool       error;

            v.FromXml2(xreader, out error);

            xreader.Close();

            if (error)
            {
                v = null;
                return(null);
            }
            return(v);
        }
Ejemplo n.º 2
0
        public static SOPVehicle FromXml2(XmlReader reader)
        {
            SOPVehicle vehicle = new SOPVehicle();

            bool errors = false;

            vehicle.FromXml2(reader, out errors);
            if (errors)
            {
                return(null);
            }

            return(vehicle);
        }