posted 19 years ago
Hi everyone!
I made a program which gets the text out of a HTML file. It removes the tags, gets the text out from between tags and also gets any remaining parts if a "tag is unfinished". It also checks for /n/r and makes only one space if more would be needed. My problem is, that the linebreaks don't get into the right place. When i find a text, all the linebreaks go before it. Why? Btw, i need the texts to do stuff on them, then write them back, i skipped that from the code. Technically this code copies the file to another, but the variable are there to do comparison, etc.
textToWrite: this should be the same as we read in, but it's not. In certain cases i would write some stuff before and after it, but that should not change the linebreaks.
textToCompare: the same like textToWrite, but linebreaks are removed.
tagToWrite: tags, skipped from other functions, but will be written back unchanged as well.
This is my code:
Could anyone please help me? Thanks!
[ December 13, 2005: Message edited by: Csaba Kassitzky ]