We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 12c11d0 + dfeca63 commit 9b6c394Copy full SHA for 9b6c394
javascript/ql/src/semmle/javascript/XML.qll
@@ -34,6 +34,12 @@ abstract class XMLLocatable extends @xmllocatable {
34
* both of which can contain other elements.
35
*/
36
class XMLParent extends @xmlparent {
37
+ XMLParent() {
38
+ // explicitly restrict `this` to be either an `XMLElement` or an `XMLFile`;
39
+ // the type `@xmlparent` currently also includes non-XML files
40
+ this instanceof @xmlelement or xmlEncoding(this, _)
41
+ }
42
+
43
/**
44
* Gets a printable representation of this XML parent.
45
* (Intended to be overridden in subclasses.)
0 commit comments