问题
Where are the schemas (DTD or XML schema) for the XML files used on Android like AndroidManifest.xml or the layouts?
回答1:
The schemas don't exist as an xml file. Schemas are dependent upon what UI classes your program uses. There's a slightly better discussion here.
回答2:
Generally, defining a namespace in XML doesn't has to be a real existing URL but just a world wide unique String (therefore one prefers using their own URLs). Of course, it's nice if this URL contains the XML-schema (or worse, DTD). It would be also very nice if someone would create Android Ressource Schemata. I could help him as a bachelor thesis in CS. - Prof. Solymosi, Berlin
回答3:
The XML schema doesn't seem to be documented, but there is a useful list of all the layout objects and their permitted attributes here:
http://developer.android.com/reference/android/R.styleable.html#lfields
来源:https://stackoverflow.com/questions/605325/where-are-the-schemas-for-xml-files-on-an-android-project