There are a lot of ways in python provided by the standard installation to process an XML, even more as external packages, see http://wiki.python.org/moin/PythonXml.
For my project I use minidom, it does what I need, but the error reporting is rather telegraphic, for example:
no element found: line 7, column 0
which is correct but is not very human readable, no hinting to which element might be needed. Because of lack of information, I cannot report the error to an user.
This is just an example but there are more cases where minidom could be more detailed but is not. So I need something detailed, an error detailed enough that I can pass the parsing error back to an user.
Which of the standard XML „processing solutions” has the most detailed error reporting, if none which of the external packages for XML support has that?
The xml file that was used for parsing, which in the code is used as config.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets">
<icon src="icon.png"/>
<content src="index.html"/>
<name>sample</name>
I tried to do a survey on all the parsers from the above link to see which one has the most useful error reporting, I stopped at lxml:
The conclusion is that
lxmllibrary had the best error reporting from the above list: