CsQuery.CQ.CreateNewFragment C# (CSharp) Метод

CreateNewFragment() защищенный Метод

Bind this instance to a new empty DomFragment configured with the default options.
protected CreateNewFragment ( ) : void
Результат void
        protected void CreateNewFragment()
        {
            Document = new DomFragment();
        }

Same methods

CQ::CreateNewFragment ( CQ target, string html, string context, DocType docType ) : void
CQ::CreateNewFragment ( IEnumerable elements ) : void

Usage Example

Пример #1
0
        /// <summary>
        /// Creeate a new fragment from HTML text, in the context of a specific HTML tag.
        /// </summary>
        ///
        /// <param name="html">
        /// A string of HTML.
        /// </param>
        /// <param name="context">
        /// The HTML tag name which is the context
        /// </param>
        ///
        /// <returns>
        /// The new fragment.
        /// </returns>

        public static CQ CreateFragment(string html, string context)
        {
            CQ cq = new CQ();

            cq.CreateNewFragment(cq, html, context, DocType.Default);
            return(cq);
        }
All Usage Examples Of CsQuery.CQ::CreateNewFragment