Example #1
0
 /// <summary>
 /// Starts a new selection for the provided set of nodes
 /// </summary>
 public CssSelector(string selector, HtmlNode start)
     : this(selector, new HtmlNode[] { start })
 {
 }
Example #2
0
 /// <summary>
 /// Prepends a node to this node
 /// </summary>
 public void Prepend(HtmlNode node)
 {
     this.Prepend(new HtmlNode[] { node });
 }
Example #3
0
 /// <summary>
 /// Appends a node to this node
 /// </summary>
 public void Append(HtmlNode node)
 {
     this.Append(new HtmlNode[] { node });
 }
Example #4
0
 /// <summary>
 /// Moves a node before the target node
 /// </summary>
 public void InsertBefore(HtmlNode target)
 {
     if (target == null) { return; }
     this.Detatch();
     target.Parent._Container.InsertBefore(
         this._Container,
         target._Container
         );
 }
Example #5
0
 /// <summary>
 /// Append an additional node to this context
 /// </summary>
 public void AddNodes(HtmlNode node)
 {
     this.AddNodes(new HtmlNode[] { node });
 }