rename all occurrences of XML to Xml

This commit is contained in:
erik-krogh
2022-08-16 22:19:14 +02:00
parent 72c204063d
commit ce9f69a639
49 changed files with 407 additions and 287 deletions

View File

@@ -44,7 +44,7 @@ class ListType extends RefType {
}
}
/** Holds if the specified `method` uses MyBatis Mapper XMLElement `mmxx`. */
/** Holds if the specified `method` uses MyBatis Mapper XmlElement `mmxx`. */
predicate myBatisMapperXmlElementFromMethod(Method method, MyBatisMapperXmlElement mmxx) {
exists(MyBatisMapperSqlOperation mbmxe | mbmxe.getMapperMethod() = method |
mbmxe.getAChild*() = mmxx
@@ -68,7 +68,7 @@ predicate myBatisSqlOperationAnnotationFromMethod(Method method, IbatisSqlOperat
}
/** Gets a `#{...}` or `${...}` expression argument in XML element `xmle`. */
string getAMybatisXmlSetValue(XMLElement xmle) {
string getAMybatisXmlSetValue(XmlElement xmle) {
result = xmle.getTextValue().regexpFind("(#|\\$)\\{[^\\}]*\\}", _, _)
}

View File

@@ -32,13 +32,13 @@ predicate hasEmbeddedPassword(string value) {
)
}
from XMLAttribute nameAttr
from XmlAttribute nameAttr
where
nameAttr.getName().toLowerCase() in ["password", "pwd"] and
not isNotPassword(nameAttr.getValue().trim()) // Attribute name "password" or "pwd"
or
exists(
XMLAttribute valueAttr // name/value pair like <property name="password" value="mysecret"/>
XmlAttribute valueAttr // name/value pair like <property name="password" value="mysecret"/>
|
valueAttr.getElement() = nameAttr.getElement() and
nameAttr.getName().toLowerCase() = "name" and

View File

@@ -3,9 +3,9 @@ import java
/**
* A deployment descriptor file, typically called `struts.xml`.
*/
class StrutsXmlFile extends XMLFile {
class StrutsXmlFile extends XmlFile {
StrutsXmlFile() {
count(XMLElement e | e = this.getAChild()) = 1 and
count(XmlElement e | e = this.getAChild()) = 1 and
this.getAChild().getName() = "struts"
}
}
@@ -16,7 +16,7 @@ deprecated class StrutsXMLFile = StrutsXmlFile;
/**
* An XML element in a `StrutsXMLFile`.
*/
class StrutsXmlElement extends XMLElement {
class StrutsXmlElement extends XmlElement {
StrutsXmlElement() { this.getFile() instanceof StrutsXmlFile }
/**