[Python] Parse through invalid XML in python

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have an XML file that's so big, whenever I'm opening the file in VS Code the programm keeps crashing. I want to count the occurrence of certain elements in the file. However, this is a file that is invalid XML.

    So I cannot use the parsing libraries like xml.etree.ElementTree because I get an error back.

    How can I count the elements without having to validate the XML file?

    Continue reading...

Compartilhe esta Página