protected CreateNewFragment ( IEnumerable |
||
elements | IEnumerable |
/// The elements to provide the source for this object's DOM. /// |
return | void |
protected void CreateNewFragment(IEnumerable<IDomObject> elements)
{
Document = DomDocument.Create(elements.Clone(), HtmlParsingMode.Fragment);
AddSelection(Document.ChildNodes);
}
CQ::CreateNewFragment ( ) : void | |
CQ::CreateNewFragment ( |
/// <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); }