示例#1
0
 public static void Serialize(XmlWriter xWrite, VariantGroupType contents)
 {
     XmlSerializer Writer = new XmlSerializer(contents.GetType());
     XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
     ns.Add("", "http://www.hybrasyl.com/XML/Items");
     Writer.Serialize(xWrite, contents, ns);
 }
示例#2
0
 public static VariantGroupType Deserialize(XmlReader reader, VariantGroupType contents = null)
 {
     //reader.Settings.IgnoreWhitespace = false;
     if (contents == null) contents = new VariantGroupType();
     XmlSerializer XmlSerial = new XmlSerializer(contents.GetType());
     if (XmlSerial.CanDeserialize(reader))
     {
         var xContents = XmlSerial.Deserialize(reader);
         contents = (VariantGroupType)xContents;
     }
     return contents;
 }