Don't use xml for location replace at; also PEP8
Merge pull request #398 from cmc333333/perf-xml

Performance Tweak 7: Don't build up XML nodes