>>27
OK how about this:
<html>
<head>
<script>
window.onload = function() {
var body = document.getElementsByTagName('body')[0];
var sexpr = body.getAttribute('data-sexpr');
body.appendChild(parse_sexpr(sexpr));
};
function parse_sexpr(sexpr) {
/* Implementation is left as an exercise to the reader. */
}
</script>
</head>
<body data-sexpr="
(p
(span
(/attr style "color: red; font-weight: bold;")
"hax my anus" ))
"></body>
</html>
The end result would obviously be a DOM tree like this:
<html>
<body>
<p>
<span style="color: red; font-weight: bold;">hax my anus</span>
</p>
</body>
</html>