Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 71 Next »

Description / Features

This plugin enables analysis of XML within SonarQube.

Some common use cases are:

  • Validation of XHTML files against schemas provided by the W3C (strict, transitional, and others)
  • Validation of XML files against a provided XML schema
  • Validation of rules in XML files (ex: validate the Maven pom files against coding standards)


  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQube server


Run an Analysis with the SonarQube Runner (Recommended Method)

To run an analysis of your XML project, use the SonarQube Runner.

A sample project is available on github that can be browsed or downloaded/projects/languages/xml/xml-sonar-runner.

Run an Analysis with the other Analyzers

Maven and Ant can also be used to launch analysis on XML projects.

Validating Files Against Specific Schemas

Files can be validated against specific schemas thanks to the XML Schema Validation rule.

Within the same project some files can be validated against schema 'S1', others against schema 'S2', others against schemas 'S3' and 'S4', and so on. Therefore, this rule must be copied and configured as many times as you have pairs of files/schemas.


  • Schema validation is performed by the Xerces parser using XML schemas (XSDs).
  • For validation of XHTML files it is recommended to use autodetect, xhtml1-transitional or xhtml1-strict.

Custom Checks Using XPath Expressions

The XPath rule allows you to define custom rules on XML documents using XPath expressions.

Within the same project some files can be checked against XPath rules 'R1', 'R2', etc., others against rules 'R6', 'R7', etc. and so on. Therefor, this rule has to be copied and configured as many times as you have pairs of files/rule.


See Metrics documentation page.

Change Log


Version 1.0.1 (1 issues)



Version 1.0 (15 issues)



Version 0.2 (9 issues)

  • No labels