Advertisement
Guest User

Untitled

a guest
Jan 9th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using CsQuery;
  2.  
  3. public class MyClass{
  4.   DOM = CQ.Create(/*HTML path*/);
  5.  
  6.   public CQ S(string selector){
  7.     return DOM.Select(selector);
  8.   }
  9.  
  10.   public CQ S(IDomObject o){
  11.     return o.Cq();
  12.   }
  13.  
  14.   void someFunction(){
  15.     S("img.someClass").Attr("alt","hello");
  16.     S("div").Each( (e) =>{
  17.       S(e).Append("world!");
  18.     });
  19.   }  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement