XML parsing error: mismatched tag

0

I would like to ask why in this xml I get an error, I am very new and I want to add some options, but when I add them now I miss this error when compiling, I asked previously on the web in English and they told me it is because I do not close the tags of com.whatsapp.preference.WaPreference, link "Andy" left me the complete code, I tried to put it but it also gave me an error, I closed the last label because there is a third one and it also gave me an error, I used a web to see the error but it was compiled and when I opened the option in the app closes me because everything went away, I would like to know how it is that I have to place the code, and that if someone can explain to me what I did wrong. Thank you very much.

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/GB_Mods"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:cmwmobile="http://schemas.android.com/apk/res/com.whatsapp">
<PreferenceCategory android:title="HPWhatsApp 4.0" android:key="cat_wa">
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_preguntas" android:title="HPWhatsApp WEB" android:key="settings_faq" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_actualizaciones" android:title="@string/updatess" android:key="updates_key" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_Thanks" android:title="Donar" android:summary="Donar al desarrollador" >
        <intent android:action="android.intent.action.VIEW" android:data="https://paypal.me/Hectorc4rp" />
     </com.whatsapp.preference.WaPreference>
    <PreferenceScreen android:icon="@drawable/ic_9" android:title="Contactar al desarrollador" android:summary="Habla con Héctor Paez, creador de HPWhatsApp" >
        <intent android:action="android.intent.action.VIEW" android:data="https://api.whatsapp.com/send?phone=543814805749" />
    </PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory android:title="@string/themes">
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_descargar" android:title="@string/download_themes" android:key="download_themes" android:summary="@string/download_themes_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_temas" android:title="@string/more_preferences" android:key="themes_key" android:summary="@string/more_preferences_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_web" android:title="Más temas" android:summary="Descarga temas hechos por otras personas" >
         <intent android:action="android.intent.action.VIEW" android:data="http://www.whatsappthemes.net/search/label/GBWhatsApp%20Themes" />
    </com.whatsapp.preference.WaPreference>
</PreferenceCategory>
<PreferenceCategory android:title="@string/appearance">
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_1" android:title="@string/conversation_colors" android:key="chat_colors" android:summary="@string/conversation_colors_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_2" android:title="@string/chats_colors" android:key="chats_colors" android:summary="@string/chats_colors_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_3" android:title="@string/popup_colors" android:key="popup_key" android:summary="@string/popup_colors_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_4" android:title="@string/widgets" android:key="widget_key" android:summary="@string/widgets_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_5" android:title="@string/media_sharing_pref" android:key="media_sharing_key" android:summary="@string/media_sharing_pref_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_6" android:title="@string/others" android:key="others_key" android:summary="@string/others_summary" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_7" android:title="@string/gb_lock" android:key="gb_lock" />
    <Preference android:icon="@drawable/ic_actualizaciones" android:title="@string/clean_whatsapp_pref" android:key="clean_whatsapp_screen" />
    <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_8" android:title="@string/read_log_pref" android:key="logs_key" />
    <ListPreference android:icon="@drawable/ic_lang" android:entries="@array/language_array" android:title="@string/language_title" android:key="gb_language_key" android:defaultValue="0" android:entryValues="@array/language_values" />
    <Preference android:icon="@drawable/ic_temas" android:title="@string/change_font_pref" android:key="gb_fonts" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/GB_About" android:key="cat_about">
    <Preference android:icon="@drawable/ic_twitter" android:title="@string/pref_facebook" android:key="facebook" android:summary="@string/pref_sum_facebook" />
    <Preference android:icon="@drawable/ic_twi" android:title="@string/google_plus" android:key="google_plus" android:summary="@string/google_plus_sum" />
    <Preference android:icon="@drawable/ic_web" android:title="@string/pref_sum_blogger" android:key="about" android:summary="HPWhatsApp" />
    <Preference android:icon="@drawable/ic_twitter" android:title="Página de Facebook" android:summary="Regalanos un me gusta en Facebook" >
          <intent android:action="android.intent.action.VIEW" android:data="https://facebook.com/todo.para.android.hp" />
    <Preference android:icon="@drawable/ic_compartir" android:title="@string/GBShare" android:key="share" android:summary="@string/GBShareSum" />
    <Preference android:icon="@drawable/ic_reportar" android:title="@string/GB_Report" android:key="report" />
    <Preference android:icon="@drawable/ic_Thanks" android:title="@string/Thanks" android:key="Thanks" />
</PreferenceCategory>
</PreferenceScreen>
    
asked by Hector Paez 22.09.2017 в 16:34
source

1 answer

0

XML has a simple but mandatory structure. Basically, if you open an <elemento> element you should also close it </elemento> , unless the element is closed at the moment of opening <elemento/> . If you identify correctly, you can easily realize the errors. There is also tools that show you errors in XML . In your case, this would be the valid XML:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/GB_Mods"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:cmwmobile="http://schemas.android.com/apk/res/com.whatsapp">
    <PreferenceCategory android:title="HPWhatsApp 4.0" android:key="cat_wa">
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_preguntas" android:title="HPWhatsApp WEB" android:key="settings_faq" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_actualizaciones" android:title="@string/updatess" android:key="updates_key" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_Thanks" android:title="Donar" android:summary="Donar al desarrollador" >
            <intent android:action="android.intent.action.VIEW" android:data="https://paypal.me/Hectorc4rp" />
         </com.whatsapp.preference.WaPreference>
        <PreferenceScreen android:icon="@drawable/ic_9" android:title="Contactar al desarrollador" android:summary="Habla con Héctor Paez, creador de HPWhatsApp" >
            <intent android:action="android.intent.action.VIEW" android:data="https://api.whatsapp.com/send?phone=543814805749" />
        </PreferenceScreen>
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/themes">
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_descargar" android:title="@string/download_themes" android:key="download_themes" android:summary="@string/download_themes_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_temas" android:title="@string/more_preferences" android:key="themes_key" android:summary="@string/more_preferences_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_web" android:title="Más temas" android:summary="Descarga temas hechos por otras personas" >
             <intent android:action="android.intent.action.VIEW" android:data="http://www.whatsappthemes.net/search/label/GBWhatsApp%20Themes" />
        </com.whatsapp.preference.WaPreference>
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/appearance">
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_1" android:title="@string/conversation_colors" android:key="chat_colors" android:summary="@string/conversation_colors_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_2" android:title="@string/chats_colors" android:key="chats_colors" android:summary="@string/chats_colors_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_3" android:title="@string/popup_colors" android:key="popup_key" android:summary="@string/popup_colors_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_4" android:title="@string/widgets" android:key="widget_key" android:summary="@string/widgets_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_5" android:title="@string/media_sharing_pref" android:key="media_sharing_key" android:summary="@string/media_sharing_pref_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_6" android:title="@string/others" android:key="others_key" android:summary="@string/others_summary" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_7" android:title="@string/gb_lock" android:key="gb_lock" />
        <Preference android:icon="@drawable/ic_actualizaciones" android:title="@string/clean_whatsapp_pref" android:key="clean_whatsapp_screen" />
        <com.whatsapp.preference.WaPreference android:icon="@drawable/ic_8" android:title="@string/read_log_pref" android:key="logs_key" />
        <ListPreference android:icon="@drawable/ic_lang" android:entries="@array/language_array" android:title="@string/language_title" android:key="gb_language_key" android:defaultValue="0" android:entryValues="@array/language_values" />
        <Preference android:icon="@drawable/ic_temas" android:title="@string/change_font_pref" android:key="gb_fonts" />
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/GB_About" android:key="cat_about">
        <Preference android:icon="@drawable/ic_twitter" android:title="@string/pref_facebook" android:key="facebook" android:summary="@string/pref_sum_facebook" />
        <Preference android:icon="@drawable/ic_twi" android:title="@string/google_plus" android:key="google_plus" android:summary="@string/google_plus_sum" />
        <Preference android:icon="@drawable/ic_web" android:title="@string/pref_sum_blogger" android:key="about" android:summary="HPWhatsApp" />
        <Preference android:icon="@drawable/ic_twitter" android:title="Página de Facebook" android:summary="Regalanos un me gusta en Facebook" >
              <intent android:action="android.intent.action.VIEW" android:data="https://facebook.com/todo.para.android.hp" />
        </Preference>
        <Preference android:icon="@drawable/ic_compartir" android:title="@string/GBShare" android:key="share" android:summary="@string/GBShareSum" />
        <Preference android:icon="@drawable/ic_reportar" android:title="@string/GB_Report" android:key="report" />
        <Preference android:icon="@drawable/ic_Thanks" android:title="@string/Thanks" android:key="Thanks" />
    </PreferenceCategory>
</PreferenceScreen>
    
answered by 22.09.2017 в 22:32