On 7/27/2012 9:23 PM, todd.tab...@gmail.com wrote:
I'm looking to search an entire XML file for specific text and
replace that text, while maintaining the structure of the XML file.

For a one-off project, or for experimentation, I would use a proper text-editor* and run through with search/replace. For automation, use Jason's suggestion of .replace, perhaps on a line-by-line basis.

* By definition, such only make changes you request. Notepad++ is one such on Windows. You do not want a word or document processor, or, for simple xml oblivious text substitutions, an xml processor. Such things often make changes of various sorts.

--
Terry Jan Reedy



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to