On 28.04.10 15:02, james_027 wrote:
> hi,
>
> Any idea how I can replace words in a html file? Meaning only the
> content will get replace while the html tags, javascript, & css are
> remain untouch.
You could try XIST (http://www.livinglogic.de/Python/xist/):
Example code:
from ll.xist import
On 30Apr2010 07:15, Stefan Behnel wrote:
| Cameron Simpson, 30.04.2010 00:47:
| >Here's a function from a script I wrote to bulk edit a web site. I was
| >replacing OBJECT and EMBED nodes with modern versions:
| >
| > def recurse(node):
| > global didmod
| > [...]
| > didmod=Tr
Cameron Simpson, 30.04.2010 00:47:
Here's a function from a script I wrote to bulk edit a web site. I was
replacing OBJECT and EMBED nodes with modern versions:
def recurse(node):
global didmod
[...]
didmod=True
continue
recurse(O)
>
The calling end
On 29Apr2010 05:03, james_027 wrote:
| On Apr 29, 5:31 am, Cameron Simpson wrote:
| > On 28Apr2010 22:03, Daniel Fetchinson wrote:
| > | > Any idea how I can replace words in a html file? Meaning only the
| > | > content will get replace while the html tags, javascript, & css are
| > | > remain
>> > | > Any idea how I can replace words in a html file? Meaning only the
>> > | > content will get replace while the html tags, javascript, & css are
>> > | > remain untouch.
>> > |
>> > | I'm not sure what you tried and what you haven't but as a first trial
>> > | you might want to
>> > |
>> > |
On Apr 29, 10:38 am, Daniel Fetchinson
wrote:
> > | > Any idea how I can replace words in a html file? Meaning only the
> > | > content will get replace while the html tags, javascript, & css are
> > | > remain untouch.
> > |
> > | I'm not sure what you tried and what you haven't but as a first tr
On Apr 29, 5:31 am, Cameron Simpson wrote:
> On 28Apr2010 22:03, Daniel Fetchinson wrote:
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and what you haven't but as a first trial
> | you might want to
> |
> |
> |
> | f = open( 'new
On 28Apr2010 22:03, Daniel Fetchinson wrote:
| > Any idea how I can replace words in a html file? Meaning only the
| > content will get replace while the html tags, javascript, & css are
| > remain untouch.
|
| I'm not sure what you tried and what you haven't but as a first trial
| you might want
On Apr 28, 8:02 am, james_027 wrote:
> hi,
>
> Any idea how I can replace words in a html file? Meaning only the
> content will get replace while the html tags, javascript, & css are
> remain untouch.
>
> THanks,
> James
You might try cleaning the HTML with uTidy (http://
utidylib.berlios.de/) to
> Any idea how I can replace words in a html file? Meaning only the
> content will get replace while the html tags, javascript, & css are
> remain untouch.
I'm not sure what you tried and what you haven't but as a first trial
you might want to
f = open( 'new.html', 'w' )
f.write( open( 'index.h
11 matches
Mail list logo