[Htmlparser-user] Searching HTML for areas not in tags
Brought to you by:
derrickoswald
|
From: 'Sam Birch' <Sam...@ca...> - 2005-12-21 12:53:18
|
Hi I've got a load of HTML templates that I want to access via HTMLParser to alter the text in them. The text at the start of the template is of the form: !ADMIN LOG !AD_PARAM TEXT = A message here !END_ADMIN <table> . . . I'm trying to replace the text "A message here" with something else. I'm trying to put together a tag to extract this, but the problem is that since there is no <> tag at the start of the HTML, HTMLParser can't identify the text I want. I've tried using "" as the mID for the tag - but no luck. If I use Firefox's DOM explorer to view the page, it will "magically" generate the <HTML> and <BODY> tags such that the page makes sense. Is there any way for me to do something similar in HTMLParser? Or perhaps check for specific text (e.g. !ADMIN - this text doesn't appear anywhere else in my HTML) Any advice would be greatly appreciated! Sam |