Describe the algorithm write pseudo code or optionally


ParseTags pseudo code

*Read in file. Begin parsing *Set current tag level to 0. *Set level to 1 *for each tag{ if(the tag contains )(opening tag){ Set temp to 1 Print opening tag Add temp and current word into hash map Increment temp variable by one } else if(the tag contains )(closing tag){ Decrement temp by one Print closing tag if(the tag is empty){ Exit Increment level by 1 continue process until the end of the file } } } *Display Hashmap contents

Please note that using a a parser like Xerces is not acceptable. You can either

Describe the algorithm, write pseudo code or optionally implement the solution.

Describe how to implement a simple parser that does well-formedness checking on XML, such as the following:

x

y

z.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Describe the algorithm write pseudo code or optionally
Reference No:- TGS01374302

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)