Basic XML

The Basic XML Ruleset contains a collection of good practices which everyone should follow.

MistypedCDATASection

Since: PMD 5.0

An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and ends with a ]]> marker, which has only two ].

 
//cdata-section[starts-with(@Image,'[') or ends-with(@Image,']')]

             
Example(s):
 
An extra [ looks like &lt;!CDATA[[]]&gt;, and an extra ] looks like &lt;!CDATA[]]]&gt;.