XML:尾部不允许有内容
我收到这些错误
Multiple annotations found at this line:
    - error: Error parsing XML: not well-formed 
     (invalid token)
    - Content is not allowed in trailing section.
在这个XML文件上...
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item 
    android:state_enabled="false"
        android:drawable="@drawable/btn_red" />
    <item 
        android:state_pressed="true" 
        android:state_enabled="true"
        android:drawable="@drawable/btn_orange" />
    <item 
        android:state_focused="true" 
        android:state_enabled="true"
        android:drawable="@drawable/btn_orange" />
    <item 
        android:state_enabled="true"
        android:drawable="@drawable/btn_black" />
</selector>
对于了解XML的人来说可能很简单。 任何想法?
  如果您从链接到的网站粘贴,则有两个不需要的连字符。  一个在</selector> ,一个在第一个<item> 。  摆脱这些,一切都会好的。 
<resources>
    <string name="app_name">Test App</string>
</resources>
testData("test");
If in any xml file unfortunately this type of line is remaining then this error is occur. 
结束标记后面是否有任何无关字符(我假设您发布的内容仅仅是文件的摘录,因为如果没有至少一个结束标记,它显然不起作用)?
链接地址: http://www.djcxy.com/p/34919.html上一篇: XML: content is not allowed in trailing section
下一篇: Java Unescaping XML/HTML before JAXB parsing doesn't work
