If my question isn't clear,I don't want the outerhtml which returns all the contents inside a node.I don't want those.For example:
<div id="foo" class="something" style="width:80%; display:inline-block">
Hello!
<div id="bar" class="something_else">
How are you?Hope you are doing well!
</div>
</div>
Now,outerHTML of 'foo' will give the whole string representation of its DOM structure.I just want
div id="foo" class="something" style="width:80%; display:inline-block"
Is it possible to get this without using regex/string matching?