add single quote to the set of characters to escape
Added the ability to fix up bad xml element names