Android Pull解析复杂XML文件:这个Xml文件Android该怎么解析???

<?xml version="1.0" encoding="UTF-8"?>
























xml

2个回答

<?xml version="1.0" encoding="UTF-8"?>

<Student>

    <item name="张三"         id="0"/>

    <item name="李四"         id="1"/>

    <item name="王五"         id="2"/>

    <item name="赵强"         id="3"/>

    <item name="沈阳"         id="4"/>

</Student>

<Class>

    <item name="一班"             id="0"/>

    <item name="二班"             id="1"/>

    <item name="三班"             id="2"/>

    <item name="四班"             id="3"/>

    <item name="五班"             id="4"/>

</Class>

<Teacher>

    <item name="王老师"  id="0" 
        handler="com.test.teacher.wangTeacher"/>

    <item name="刘老师"  id="1" 
        handler="com.test.teacher.liuTeacher"/>

    <item name="赵老师"  id="2" 
        handler="com.test.teacher.zhaoTeacher"/>

    <item name="张老师"  id="3" 
        handler="com.test.teacher.zhangTeacher"/>

    <item name="高老师"  id="4"
        handler="com.test.teacher.gaoTeacher"/>

</Teacher>

name="pingguschool"
clas="com.test.schoole.pingguSchool"/>

<School
    name="beijingschoole"
    clas="com.test.schoole.beijingSchool"/>

GHSYue
GHSYue 上边这个XML文件该怎么解析??
4 年多之前 回复

<?xml version="1.0" encoding="UTF-8"?>

<Student>

    <item name="张三"         id="0"/>

    <item name="李四"         id="1"/>

    <item name="王五"         id="2"/>

    <item name="赵强"         id="3"/>

    <item name="沈阳"         id="4"/>

</Student>

<Class>

    <item name="一班"             id="0"/>

    <item name="二班"             id="1"/>

    <item name="三班"             id="2"/>

    <item name="四班"             id="3"/>

    <item name="五班"             id="4"/>

</Class>

<Teacher>

    <item name="王老师"  id="0" 
        handler="com.test.teacher.wangTeacher"/>

    <item name="刘老师"  id="1" 
        handler="com.test.teacher.liuTeacher"/>

    <item name="赵老师"  id="2" 
        handler="com.test.teacher.zhaoTeacher"/>

    <item name="张老师"  id="3" 
        handler="com.test.teacher.zhangTeacher"/>

    <item name="高老师"  id="4"
        handler="com.test.teacher.gaoTeacher"/>

</Teacher>

name="pingguschool"
clas="com.test.schoole.pingguSchool"/>

<School
    name="beijingschoole"
    clas="com.test.schoole.beijingSchool"/>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐