public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value) { if (node.ClrType != typeof(object)) XmlTypeSerializer.For(node.ClrType).SetValue(node, parent, accessor, oldValue, ref value); else node.Clear(); }
public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, object oldValue, ref object value) { if (node.ClrType != typeof(object)) { XmlTypeSerializer.For(node.ClrType).SetValue(node, parent, accessor, oldValue, ref value); } else { node.Clear(); } }
private void AddReference(IXmlNode node, Entry entry) { if (!entry.Node.PositionEquals(node)) { if (entry.References == null) { GenerateId(entry); format.SetIdentity(entry.Node, entry.Id); } node.Clear(); entry.AddReference(node); format.SetReference(node, entry.Id); } }
public static void SetXsiNil(this IXmlNode node, bool nil) { string value; if (nil) { node.Clear(); value = NilValue; } else { value = null; } node.SetAttribute(Xsi.Nil, value); }
public override void WriteStartElement(string prefix, string localName, string ns) { try { if (IsInRoot) { ChildWriter.WriteStartElement(prefix, localName, ns); state = WriteState.Content; } else // is in prolog { RequireState(WriteState.Start, WriteState.Prolog); node.Clear(); state = WriteState.Element; } depth++; } catch { Reset(WriteState.Error); throw; } }
public void Clear() { node.Clear(); }