Hi :)
I have a problem with my code - the point of it is to save separately individiual parts of a .html file into struct.
For example, this is .html file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<html>
<head>
text text 123
</head>
<body>
<ul>
list
</ul>
<p>
life life12356
</p>
<table>
example table
</table>
</body>
</html>
As simple as it is, and i need to save everything for example between <table> and </table> into struct records.table.
The problem is, my code works only for the first example with <head>, but with the rest - it does not.
it looks like you read all of the file looking for head, and then read the rest of the file looking for the others (but there is nothing left in the file now, you already read all of it).
instead it looks like you need this format:
1 2 3 4 5 6 7
while(blah.getline(..))
{
if( line == '<head\>')
do head stuff
elseif (line == '<more tags\>')
etc
} //end while