public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value)
        {
            var newNode = (XmlNode)value;

            using (var writer = new XmlSubtreeWriter(node))
                newNode.WriteTo(writer);
        }
Esempio n. 2
0
        public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value)
        {
            var serializable = (IXmlSerializable)value;
            var root         = XmlDefaultSerializer.Root;

            using (var writer = new XmlSubtreeWriter(node))
            {
                // Pre-write containing element
                writer.WriteStartElement(string.Empty, root.ElementName, root.Namespace);
                serializable.WriteXml(writer);
                writer.WriteEndElement();
            }
        }
 public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value)
 {
     using (var writer = new XmlSubtreeWriter(node))
         serializer.Serialize(writer, value);
 }