DEV Community

Bruce Axtens
Bruce Axtens

Posted on

How do I retrieve OuterHtml without the InnerHtml?

-1

So I'm trying to find all matching items in an chunk of HTML. Lets use the following as an example:

<body>
    <div>
    test
    <a href="test">
        <img src="test">
    </a>
    </div>
</body>

So we go looking for the word test and we find it first in the <div> and then in the…

Top comments (1)

Collapse
 
bugmagnet profile image
Bruce Axtens