c# - How to select with omitting a specific child using XPath? -


i have following html:

<div id="main-body">     <div id="answerform">         //  ... few children here want         <form id=mwanser">         </form>     </div> </div> 

i want in main-body, except in form tag... (and don't want form tag too)....

i tried xpath lot didn't succeed.

i'm working c# , htmlagilitypack, maybe there's way navigate child , delete instead? first option me must xpath too.

with xpath if select node obtain node , every descendant in it. can select children directly unwanted node. taking sample test, can write:

"/*/*/*[not(self::form)]" 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -