ruby - How to select all children except x from a HTML node -
i have block of html need extract text:
<div class="comment"> <span class="c00"> text <p>text</p> <p>text</p> <div class="reply">reply</div> </span> </div>
note 'text' text node no html tags within span class="c00"
.
how select texts without div class="reply"
?
i tried :not
operator:
.c00:not(.reply)
but did not work.
looks can't. set styles .c00
, overwrite in .reply
:
.c00 { color: #f00; font-weight: 700; font-style: italic; } .reply { color: #000; font-weight: 400; font-style: normal; }
<div class="comment"> <span class="c00"> text <p>text</p> <p>text</p> <div class="reply">reply</div> </span> </div>
Comments
Post a Comment