directly to the question:
I have CsQuery object with some data.
CQ html=new CQ("<div id='wrapper'> <p id='getIt'></p> </div>");
I want to get p and assign it to a new CQ object :
Cq newHtml=html["p"];
When I do that, it also inherits the original DIV. How can I make p element be the 'root'. ?
I have been trying everything:
after html.MakeRoot() if I use .Select() it still returns the DIV.
Also I tried using the .Find function (it search within the selected element) but it doesn't resolve my problem because I use a third-party library function which uses .Select()...
I know that I can do something like that
CQ html=new CQ(html["p"].RenderSelection());
But it's kind of....
Thank you!