Error parsing XML: junk after document element
来源:互联网 发布:mac如何切换输入法 编辑:程序博客网 时间:2024/06/03 10:58
今天开始接触android的Java编程,出现问题了。
我的代码是这样的:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context=".MainActivity" >
</LinearLayout>
<EditText android:id="@+id/edit_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />
应该把</LinearLayout>放在最后一行。
原因:
这里Android123提示大家一般合法的XML文件只有一个主根节点,比如
<android123>
<item1/>
<item2/>
<item3/>
</android123>
如果出现了Error parsing XML: junk after document element这样的错误,你的想法可能只要主根有多个节点,比如说
<android123>
<item1/>
</android123>
<android123>
<item2/>
<item3/>
</android123>
- Error parsing XML: junk after document element
- Error parsing XML: junk after document element这样的错误
- xml parsing fatal error:Invalid document struture,line 1,
- Q: IOException parsing XML document
- Using DOM parsing XML document
- Error parsing XML. org.xml.sax.SAXParseException: Element type "sqlMapConfig" must be declared出错解决方法
- 利用Pull解析xml时,总抛出这个异常:Error parsing document的解决方案
- XML error parsing SOAP payload on line 2: Invalid document end
- 调试过程中出现以下问题.\layout\activity_main.out.xml:1: error: Error parsing XML: no element found
- unexpected exception parsing XML document from .......异常
- Error parsing XML: unbound prefix
- Error parsing XML: unbound prefix
- Error parsing Mapper XML. Cause
- Error parsing XML: mismatched tag
- Error parsing XML: unbound prefix
- error:Error parsing XML:unbound prefix
- error:Error parsing XML:unbound prefix
- android - error: Error parsing XML: unbound prefix
- js中createElement方法的兼容性
- 转载_linux kill信号列表
- 记录下 linux安装织梦cms遇到的问题和解决方法
- CreateEvent 和OpenEvent时事件全局名称问题 Global
- IN和EXISTS的详解(精品)
- Error parsing XML: junk after document element
- 状态栏的一些操作
- 优化思路整理-2-锁
- AspNetPager属性
- hibernate 的hql查询语句中使用fetch的注意点
- java将数据库查询数据导入excel
- 一点点的社会经济学和组织领导学
- [Pro.android.3][读书笔记]Android 04 理解内容提供者 连载
- 动态库so和静态库a