Well, the easy way would be something like this: Read the file into a TStringList variable (
TStringList.LoadFromFile) and replace everything in
TStringList.Text from (and including) <header> to </header> with "<header>your_new_text</header>" with the
StringReplace function. However, I doubt that this will be the fastest way in terms of performance (e.g. because the .Text property makes a copy of the whole string).
[EDIT]
It just came to me that StringReplace in Delphi doesn't work with offsets. So, you probably need to determine the offset of <header> and </header> tags with
Pos function and use
Copy function to get the substring between these tags and then use StringReplace on that substring.
[/EDIT]
Regards
Dalai