Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

    Step: 1

    blur-text-image

    Get Instant Access to Expert-Tailored Solutions

    See step-by-step solutions with expert insights and AI powered tools for academic success

    Step: 2

    blur-text-image

    Step: 3

    blur-text-image

    Ace Your Homework with AI

    Get the answers you need in no time with our AI-driven, step-by-step assistance

    Get Started

    Recommended Textbook for

    More Books

    Students also viewed these Databases questions

    Question

    To find integral of sin(logx) .

    Answered: 1 week ago

    Question

    2. Discuss the steps in preparing a manager to go overseas.

    Answered: 1 week ago