Question
The file Document.html is a simplified HTML document where there are spaces between each token - you can read in each token as a string
The file Document.html is a simplified HTML document where there are spaces between each token - you can read in each token as a string and not worry about parsing those strings. Each token is either:
An HTML start tag : something that looks like
An HTML end tag : something that looks like An end tag indicates the end of a section. An end tag should always match the most recent start tag. (The current section must end before sections started even earlier may end).
A plain word : something that looks like wordModify HTMLParse.cpps main function to read in the file Document.html and for each word, output the html tags it is inside. (Knowing that would tell us how to format the word as we render the page.)
Sample output (for full credit, the tags should appear in order from oldest to newest):
My
webpage
This
is
some
special
text.
This
The html file looks like this
html> My webpage p> This is some text.This is some other text.
And here is a list ul>
This is some other text.
And here is a list ul>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started