We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
XMLParent
1 parent 5cea452 commit 9004a8eCopy full SHA for 9004a8e
python/ql/src/semmle/python/xml/XML.qll
@@ -29,6 +29,13 @@ abstract class XMLLocatable extends @xmllocatable {
29
* both of which can contain other elements.
30
*/
31
class XMLParent extends @xmlparent {
32
+
33
+ XMLParent() {
34
+ // explicitly restrict `this` to be either an `XMLElement` or an `XMLFile`;
35
+ // the type `@xmlparent` currently also includes non-XML files
36
+ this instanceof @xmlelement or xmlEncoding(this, _)
37
+ }
38
39
/**
40
* A printable representation of this XML parent.
41
* (Intended to be overridden in subclasses.)
0 commit comments