buildingSMART / IDS-Audit-tool

Official buildingSMART tool to audit the validity of a .ids file (according to the full IDSxml standard).
MIT License
19 stars 8 forks source link

XmlException handling #9

Closed ciroraggio closed 1 year ago

ciroraggio commented 1 year ago

When there is a syntax error in the xml (e.g. '/' missing), it is not written to the logger, but an exception is raised and validation is aborted. Maybe it would be better to report it like the other errors, otherwise the exception must be handled separately.

CBenghi commented 1 year ago

Hello @ciroraggio, thanks for noticing this.

I've added a new test case to the project with an XML structural error like </ids:name /> and I've modified the code to catch the exception and notify it.

Have a look at the idsTool.tests.IssueTests.Issue09_XmlStructure test case in the code. Feel free to attach here other failing IDS files that you would like to be managed seamlessly, otherwise close the issue, please.

ciroraggio commented 1 year ago

Hello @CBenghi, thank you for the update!