One XML, Two languagens in the same file. How to Analyze?

I have a specific XML file for database migration containing the following structure:


Is there a way to create a custom preprocessor to analyze the XML file, extracting T-SQL and PL/SQL code and then provide them to their respective language analyzers?

Hey there.

I’m sure it’s possible to strip the XML to get raw SQL code in separate files, but SonarQube doesn’t (won’t) do it for you.

This suggestion is acceptable, but what would be the approach to implement this code? Would the option be to create some kind of plugin? Where should I start?

To be clear, I’m not suggesting you have SonarQube orchestrate this, but do some pre-processing of the files before SonarQube analysis is triggered.