void Write8_CiscoIPPhoneTouchArea(string n, string ns, CiscoIPPhoneTouchArea o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(CiscoIPPhoneTouchArea)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"CiscoIPPhoneTouchArea", @"");
     WriteAttribute(@"X1", @"", System.Xml.XmlConvert.ToString((global::System.UInt16)((global::System.UInt16)o.@X1)));
     WriteAttribute(@"Y1", @"", System.Xml.XmlConvert.ToString((global::System.UInt16)((global::System.UInt16)o.@Y1)));
     WriteAttribute(@"X2", @"", System.Xml.XmlConvert.ToString((global::System.UInt16)((global::System.UInt16)o.@X2)));
     WriteAttribute(@"Y2", @"", System.Xml.XmlConvert.ToString((global::System.UInt16)((global::System.UInt16)o.@Y2)));
     WriteEndElement(o);
 }
 CiscoIPPhoneTouchArea Read8_CiscoIPPhoneTouchArea(bool isNullable, bool checkType) {
     System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null;
     bool isNull = false;
     if (isNullable) isNull = ReadNull();
     if (checkType) {
     if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id7_CiscoIPPhoneTouchArea && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) {
     }
     else
         throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType);
     }
     if (isNull) return null;
     CiscoIPPhoneTouchArea o;
     o = new CiscoIPPhoneTouchArea();
     bool[] paramsRead = new bool[4];
     while (Reader.MoveToNextAttribute()) {
         if (!paramsRead[0] && ((object) Reader.LocalName == (object)id59_X1 && (object) Reader.NamespaceURI == (object)id2_Item)) {
             o.@X1 = System.Xml.XmlConvert.ToUInt16(Reader.Value);
             paramsRead[0] = true;
         }
         else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id60_Y1 && (object) Reader.NamespaceURI == (object)id2_Item)) {
             o.@Y1 = System.Xml.XmlConvert.ToUInt16(Reader.Value);
             paramsRead[1] = true;
         }
         else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id61_X2 && (object) Reader.NamespaceURI == (object)id2_Item)) {
             o.@X2 = System.Xml.XmlConvert.ToUInt16(Reader.Value);
             paramsRead[2] = true;
         }
         else if (!paramsRead[3] && ((object) Reader.LocalName == (object)id62_Y2 && (object) Reader.NamespaceURI == (object)id2_Item)) {
             o.@Y2 = System.Xml.XmlConvert.ToUInt16(Reader.Value);
             paramsRead[3] = true;
         }
         else if (!IsXmlnsAttribute(Reader.Name)) {
             UnknownNode((object)o, @":X1, :Y1, :X2, :Y2");
         }
     }
     Reader.MoveToElement();
     if (Reader.IsEmptyElement) {
         Reader.Skip();
         return o;
     }
     Reader.ReadStartElement();
     Reader.MoveToContent();
     int whileIterations12 = 0;
     int readerCount12 = ReaderCount;
     while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) {
         if (Reader.NodeType == System.Xml.XmlNodeType.Element) {
             UnknownNode((object)o, @"");
         }
         else {
             UnknownNode((object)o, @"");
         }
         Reader.MoveToContent();
         CheckReaderCount(ref whileIterations12, ref readerCount12);
     }
     ReadEndElement();
     return o;
 }