Could perhaps configure/adapt an xml reader so that it can understand / ignore code blocks? not sure how much work that would be..