Closed rmsandu closed 6 years ago
I'm afraid there's nothing that immediately comes to mind. I can recommend BeautifulSoup (https://www.crummy.com/software/BeautifulSoup/) for parsing XML that's not well formed. And sorry for taking a long time to respond.
The error appears when I have some extra text (aka junk) written outside the root element node, ie
<INFO>
Something like this:I was wondering if there is any way to ignore the "junk info" which is the text after the
</INFO>
and still be able to access the elements of the root such as let's say<INSTITUTION>
. I have hundreds of XML files and the junk text differs every time.