Since: PMD 5.0
Priority: Medium (3)
An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and ends with a ]]> marker, which has only two ].
This rule is defined by the following XPath expression:
//cdata-section[starts-with(@Image,'[') or ends-with(@Image,']')]
An extra [ looks like <!CDATA[]>, and an extra ] looks like <!CDATA]]>.
Use this rule by referencing it:
<rule ref="category/xml/errorprone.xml/MistypedCDATASection" />