I am looking for a Element property (something like innerHTML
or outerHTML
) to get the String representation of the Tag
I know it's hard to explain in my question title, but this is an example.
<div id="div1" align="center" style="border:1px solid red">
This is some text in a div element!
</div>
Expected output is
<div id="div1" align="center" style="border:1px solid red">
If such thing is not available then, best way in my mind is to do this by using outerHTML
+ regex.