You are to write a program that takes in an HTML (Hyper Text - TopicsExpress



          

You are to write a program that takes in an HTML (Hyper Text Markup Language) document--- i.e., the source code to a webpage--- through stdin and prints the document to stdout with all the HTML tags removed. HTML tags appear in two different forms. Type I Tags: The first form is a tag that is wrapped around a block of text as follows: <TAG>TEXT</TAG>. The tag opens with <TAG> and is closed with </TAG>. The string TAG will not contain any < or > characters. For example, the HTML <font color=red size=20>BIG RED TEXT</font> is rendered by your web browser as: BIG RED TEXT Type II Tags: The second form is as a tag that appears on its own as follows: <TAG />. An example of such a tag is the line break <br /> which tells the browser to insert a newline character. You must implement your program as a main function (together with relevant helper functions and documentation) in a file named striptags.c. For this question you are not allowed to use the heap section of memory, and you are also not allowed to make any assumptions about the size of the HTML document.
Posted on: Fri, 19 Jul 2013 12:00:17 +0000

Trending Topics



Recently Viewed Topics




© 2015