protected CreateNewFragment ( |
||
target | /// The target. /// | |
html | string | /// The HTML. /// |
context | string | /// The context (e.g. an HTML tag name) /// |
docType | DocType | /// (optional) type of the document. /// |
Résultat | void |
protected void CreateNewFragment(CQ target,
string html,
string context,
DocType docType)
{
target.Document = DomDocHelper.CreateDocFragment(html, context, docType);
// enumerate ChildNodes when creating a new fragment to be sure the selection set only
// reflects the original document.
target.SetSelection(Document.ChildNodes.ToList(), SelectionSetOrder.Ascending);
}
CQ::CreateNewFragment ( ) : void | |
CQ::CreateNewFragment ( IEnumerable |
/// <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); }