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 A tag indicates the start of a new section of the document. Tags may be nested inside each other.

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

The file Document.html is a simplified HTML document where there are spaces

html> My webpage p> This is some text.

This is some other text.

And here is a list ul>

  • Item 1 1i>
  • Item 2
  • Item 3 Super important /
  • /body> html> My webpage p> This is some text.

    This is some other text.

    And here is a list ul>

  • Item 1 1i>
  • Item 2
  • Item 3 Super important /
  • /body>

    Step by Step Solution

    There are 3 Steps involved in it

    1 Expert Approved Answer
    Step: 1 Unlock blur-text-image
    Question Has Been Solved by an Expert!

    Get step-by-step solutions from verified subject matter experts

    Step: 2 Unlock
    Step: 3 Unlock

    Students Have Also Explored These Related Databases Questions!