You should split up all the tasks into separate functions. All of it should be part of class.
The file handling would probably look like this. Unless you're concerned about massive files..
if(file.is_open)
{
while(getline(file, str))
{
lines.push_back(str);
}
file.close();
}
You now have the contents.
Time to just get where a tag ends and begins, continue to alter the attributes of the inner-most data based on these tags.
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
Offline 1,270 posts
since Nov 2008