예제 #1
0
        static void Main(string[] args)
        {
            IATA_PassengerConformanceIdentifyRQ localIataReq = new IATA_PassengerConformanceIdentifyRQ();
            XmlSerializer    deserializer = new XmlSerializer(localIataReq.GetType());
            StreamReader     reader       = new StreamReader(FILENAME);
            XmlRootAttribute xRoot        = new XmlRootAttribute();

            xRoot.ElementName = "IATA_PassengerConformanceIdentifyRQ";
            xRoot.IsNullable  = false;
            localIataReq      = (IATA_PassengerConformanceIdentifyRQ)deserializer.Deserialize(reader);
            reader.Close();
        }
예제 #2
0
        static void Main(string[] args)
        {
            IATA_PassengerConformanceIdentifyRQ localIataReq = new IATA_PassengerConformanceIdentifyRQ();
            XmlSerializer    deserializer = new XmlSerializer(localIataReq.GetType());
            StreamReader     reader       = new StreamReader(FILENAME);
            XmlRootAttribute xRoot        = new XmlRootAttribute();

            xRoot.ElementName = "IATA_PassengerConformanceIdentifyRQ";
            xRoot.IsNullable  = false;
            localIataReq      = (IATA_PassengerConformanceIdentifyRQ)deserializer.Deserialize(reader);
            reader.Close();
            XmlSerializer serializer = new XmlSerializer(typeof(IATA_PassengerConformanceIdentifyRQ));
            StreamWriter  writer     = new StreamWriter(@"c:\temp\test1.xml");

            serializer.Serialize(writer, localIataReq);
            writer.Flush();
            writer.Close();
            writer.Dispose();
        }