<html>
<head></head>
<body onload="document.getElementById('a').nextSibling.data = 'x';">
<div id="a" style="margin-bottom: 1em;">A</div> <div style="margin-top: 2em;">B</div>
</body>
</html>