On 28/07/2012 08:17, Terry Reedy wrote:
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.


I highly recommend the use of notepad++. If anyone knows of a better text editor for Windows please let me know :)

--
Cheers.

Mark Lawrence.

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

Reply via email to