コード例 #1
0
        protected override DomNode CloneCore()
        {
            var result = OwnerDocument.CreateDocumentFragment();

            result.CopyAnnotationsFrom(AnnotationList);
            Append(CloneAll(ChildNodes));
            return(result);
        }
コード例 #2
0
        /// <include file='doc\XmlDocumentFragment.uex' path='docs/doc[@for="XmlDocumentFragment.CloneNode"]/*' />
        /// <devdoc>
        ///    <para>Creates a duplicate of this node.</para>
        /// </devdoc>
        public override XmlNode CloneNode(bool deep)
        {
            Debug.Assert(OwnerDocument != null);
            XmlDocumentFragment clone = OwnerDocument.CreateDocumentFragment();

            if (deep)
            {
                clone.CopyChildren(this, deep);
            }
            return(clone);
        }
コード例 #3
0
 public DomDocumentFragment CreateDocumentFragment()
 {
     return(OwnerDocument.CreateDocumentFragment());
 }