This could be tidied up significantly, and at some point we will want to parse the markdown and generate more appropriate XML - but this is definitely better than nothing. Generated code changes coming in next commit.