Пример #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 })
 {
 }
Пример #2
0
 /// <summary>
 /// Prepends a node to this node
 /// </summary>
 public void Prepend(HtmlNode node)
 {
     this.Prepend(new HtmlNode[] { node });
 }
Пример #3
0
 /// <summary>
 /// Appends a node to this node
 /// </summary>
 public void Append(HtmlNode node)
 {
     this.Append(new HtmlNode[] { node });
 }
Пример #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
         );
 }
Пример #5
0
 /// <summary>
 /// Append an additional node to this context
 /// </summary>
 public void AddNodes(HtmlNode node)
 {
     this.AddNodes(new HtmlNode[] { node });
 }