I have an xml file, for example:
<file> <students> <student> <name>Arthur</name> <height>168</height> </student> <student> <name>John</name> <height>176</height> </student> </students> </file>
How to check if there is an end tag for each opening tag? For example, if I do not provide the end tag as:
<file> <students> <student> <name>Arthur</name> <height>168</height> // Ending tag for student missing here <student> <name>John</name> <height>176</height> </student> </students> </file>
How to continue parsing the rest of the file?
I tried using the SAX parser as described here , but it is not very suitable for me, because it throws an exception if I do not provide a closing tag, as in the second xml code that I provided.
source share