是否有针对Android lint.xml文件架构的DTD资源?
现在我宣布没有DTD的DOCTYPE:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE lint>
<lint>
<issue id="HardcodedText" severity="ignore" />
</lint>
使用和不使用上述DOCTYPE声明都可以正常工作。但我想使用Android Studio XML代码完成,并需要一个DTD网址。有吗?
答案 0 :(得分:0)
找不到DTD文件,但是Android Studio已经支持了一段时间。它具有某种模式,具有一些神奇的功能。
不管有人想要DTD还是一个 (通过快速阅读可以推断评论,希望我理解正确):
<!-- Based on com.android.tools.lint.client.api.DefaultConfiguration -->
<!DOCTYPE lint [
<!-- note: not actually required to have lint as the root -->
<!ELEMENT lint (issue*)>
<!-- path to baseline file, absolute or relative to project dir -->
<!ATTLIST lint baseline CDATA #IMPLIED>
<!ELEMENT issue (ignore*)>
<!-- comma separated list of Issue IDs, or "all" -->
<!ATTLIST issue id CDATA #REQUIRED>
<!ATTLIST issue severity (ignore|error|fatal|informational|warning) #IMPLIED>
<!-- note: not actually required to be called ignore, all element children of issue will be used -->
<!ELEMENT ignore EMPTY>
<!--
No glob.
string exactly matching project-relative path [platform dependent]
string prefix for project-relative path [platform dependent] (e.g. subfolder)
The following has to start with `res`:
string exactly matching res folder-relative path [platform independent]
string prefix for res folder-relative path [platform independent]
-->
<!ATTLIST ignore path CDATA #IMPLIED>
<!--
regex matching the message (not whole),
or regex matching the project-relative path (not whole)
or regex matching the Unix-formatted project-relative path [on Windows] (not whole)
-->
<!ATTLIST ignore regexp CDATA #IMPLIED>
]>