more work on parsing template xml files