I think that the best approach is to assign the onclick handler unobtrusively.
Something like this:
window.onload = function(){
var myLink = document.getElementsById('myLinkId');
myLink.onclick = function(){
parse('#', false, '<a href="xyz');
return false;
}
}
//...
<a href="#" id="myLink">Test</a>