Here is HTML on a forum:
<div class="sign">username <span class="info">info</span></div>
Here is how I need to change it by using a userscript:
<div class="sign"><a itemprop="creator">username</a> <span class="info">info</span></div>
I know how to create an a element, assign it a custom attribute, and add it to DOM.
But I don't understand how to wrap username with it. That is, how to convert username from the 1st example to <a itemprop="creator">username</a> in the second example.
edit: An a element will have href as well. I omitted it intentionally to make the code shorter.