0

嗨,我的 android 应用程序的 xml 文件有问题。它吐出这个错误

错误:无效的开始标签 Category 。. . 这是源代码。

<?xml version="1.0" encoding="UTF-8" ?>
<Category>
<destination id="1" main_cat="Hotel">
        <timestamp></timestamp>
        <business_name><![CDATA[ Sugarland Hotel ]]></business_name>
        <alias><![CDATA[ Sugarland Hotel ]]></alias>
        <address><![CDATA[ Araneta Avenue ]]></address>
        <city><![CDATA[ Bacolod ]]></city>
        <subcategory><![CDATA[ Hotel ]]></subcategory>
        <cuisine><![CDATA[ Italian,Asian ]]></cuisine>
        <budget> </budget>
        <features> </features>
        <working_days><![CDATA[ Everyday ]]></working_days>
        <opening><![CDATA[ 24/7 ]]></opening>
        <ending>    </ending>
        <contact><![CDATA[ (34)435-2690 , (34)435-2780 ]]></contact>
        <fax><![CDATA[ (34)435-2645 ]]></fax>
        <email><![CDATA[ rooms@sugarlandhotel.com ]]></email>
        <website><![CDATA[ www.sugarlandhotel.com  ]]></website>
        <payment_type><![CDATA[ cash,credit card,master card, visa ]]></payment_type>
        <lat><![CDATA[ 10.6524789N ]]></lat>
        <long><![CDATA[ 122.9372838E ]]></long>
        <desc><![CDATA[ Experience a modern hacienda retreat that nurtures the charm and romance of old world plantation living. Extensively renovated beginning 2010, Sugarland hotel unvails a celebrated balance of nostalgia and contemporary style, Capturing its original southern elegence, luxury, and decadence. Machuca tiles form cool geometric patterns in the hallways. Hacienda hardwoord floors contrast modern furnishings and amenities in the dramatic suits. The sugarland lifestyle offers guests the finest sensory indulgences: signature hacienda service, soothing organic toiletries, heirloom recipes, and unmatched privacy and tranquility. ]]></desc>
        <image>     </image>
</destination>
   </Category>

我也尝试测试CDATA我宁愿使用它还是使用 xml 模式。我在这里先向您的帮助表示感谢

4

1 回答 1

0

去掉前面的空格<?xml version="1.0" encoding="UTF-8" ?>什么都不能出现在它面前。

IntelliJ 和我的浏览器都说你的 XML 很好。一定有其他问题。

于 2012-12-16T12:19:04.170 回答