Question: You will write a program to process XML formatted text, which is a mix of normal text and XML tags. A tag is always a
You will write a program to process XML formatted text, which is a mix of normal text and XML tags. A tag is always a string beginning with < and ending with >. Between those angle brackets, is a contiguous sequence of characters, that is, there is never whitespace inside a tag. An opening tag would be
.
Write a program named CountTagTypes that takes as input an XML text file where tags and text are separated by whitespace. The program should count and print the number of each type of tag: opening, closing, self-closing.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
