Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML: content is not allowed in trailing section

Tags:

xml

I'm getting these errors

Multiple annotations found at this line:
    - error: Error parsing XML: not well-formed 
     (invalid token)
    - Content is not allowed in trailing section.

on this XML file...

<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>

Probably quite simple for you people who know XML. Any idea?

like image 475
Capsud Avatar asked May 31 '10 23:05

Capsud


1 Answers

If you pasted it from the site you link to, there are two little hyphens you don't want. One after the close of </selector> and one just before the first <item>. Get rid of those, and all will be well.

like image 178
Paul Butcher Avatar answered Sep 28 '22 09:09

Paul Butcher