I was asked to write a program to construct the tag tree given a HTML file. eg, the tree has <HTML>as its root, which has two children <HEAD> and <BODY>.
How to construct the tree efficiently? Is there any useful resources I can use to write this program?
Since I need to finish it in a very limited time. Thanks.