Work on #433.  Regex madness for XML tag parsing.  This should fix #355
but it still doesn't address the remaining issue in #433.