internal void AddNodeSkipNotify(XNode n) { this.ValidateNode(n, this); if (n.parent != null) { n = n.CloneNode(); } else { XNode parent = this; while (parent.parent != null) { parent = parent.parent; } if (n == parent) { n = n.CloneNode(); } } this.ConvertTextToNode(); this.AppendNodeSkipNotify(n); }
internal void AddNodeSkipNotify(XNode n) { ValidateNode(n, this); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = this; while (p.parent != null) { p = p.parent; } if (n == p) { n = n.CloneNode(); } } ConvertTextToNode(); AppendNodeSkipNotify(n); }
private void AddNode(XNode n) { this.parent.ValidateNode(n, this.previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode parent = this.parent; while (parent.parent != null) { parent = parent.parent; } if (n == parent) { n = n.CloneNode(); } } this.parent.ConvertTextToNode(); if (this.text != null) { if (this.text.Length > 0) { if ((this.previous is XText) && !(this.previous is XCData)) { XText previous = (XText)this.previous; previous.Value = previous.Value + this.text; } else { this.InsertNode(new XText(this.text)); } } this.text = null; } this.InsertNode(n); }
private void AddNode(XNode n) { _parent.ValidateNode(n, _previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = _parent; while (p.parent != null) { p = p.parent; } if (n == p) { n = n.CloneNode(); } } _parent.ConvertTextToNode(); if (_text != null) { if (_text.Length > 0) { XText prevXText = _previous as XText; if (prevXText != null && !(_previous is XCData)) { prevXText.Value += _text; } else { InsertNode(new XText(_text)); } } _text = null; } InsertNode(n); }
void AddNode(XNode n) { parent.ValidateNode(n, previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = parent; while (p.parent != null) { p = p.parent; } if (n == p) { n = n.CloneNode(); } } parent.ConvertTextToNode(); if (text != null) { if (text.Length > 0) { if (previous is XText && !(previous is XCData)) { ((XText)previous).Value += text; } else { InsertNode(new XText(text)); } } text = null; } InsertNode(n); }
internal XContainer(XContainer other) { if (other == null) throw new ArgumentNullException("other"); if (other.content is string) { this.content = other.content; } else { XNode n = (XNode)other.content; if (n != null) { do { n = n.next; AppendNodeSkipNotify(n.CloneNode()); } while (n != other.content); } } }
private void AddNode(XNode n) { _parent.ValidateNode(n, _previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = _parent; while (p.parent != null) p = p.parent; if (n == p) n = n.CloneNode(); } _parent.ConvertTextToNode(); if (_text != null) { if (_text.Length > 0) { XText prevXText = _previous as XText; if (prevXText != null && !(_previous is XCData)) { prevXText.Value += _text; } else { InsertNode(new XText(_text)); } } _text = null; } InsertNode(n); }
internal void AddNodeSkipNotify(XNode n) { ValidateNode(n, this); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = this; while (p.parent != null) p = p.parent; if (n == p) n = n.CloneNode(); } ConvertTextToNode(); AppendNodeSkipNotify(n); }
void AddNode(XNode n) { parent.ValidateNode(n, previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode p = parent; while (p.parent != null) p = p.parent; if (n == p) n = n.CloneNode(); } parent.ConvertTextToNode(); if (text != null) { if (text.Length > 0) { if (previous is XText && !(previous is XCData)) { ((XText)previous).Value += text; } else { InsertNode(new XText(text)); } } text = null; } InsertNode(n); }
private void AddNode(XNode n) { this.parent.ValidateNode(n, this.previous); if (n.parent != null) { n = n.CloneNode(); } else { XNode parent = this.parent; while (parent.parent != null) { parent = parent.parent; } if (n == parent) { n = n.CloneNode(); } } this.parent.ConvertTextToNode(); if (this.text != null) { if (this.text.Length > 0) { if ((this.previous is XText) && !(this.previous is XCData)) { XText previous = (XText) this.previous; previous.Value = previous.Value + this.text; } else { this.InsertNode(new XText(this.text)); } } this.text = null; } this.InsertNode(n); }