【C#从入门到遛弯】第十六章 · XmlDocument.GetElementById为NULL问题&简易寻找XML唯一属性值的节点

贴上读取的“向阳小学名单.xml”文件          

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

<Root>
    <body>
        <school name="向阳小学">
            <grade id="1" name="一年级">
                <room rid="1" name="一班">
                    <student sid = "1101" sex = "男">赵一</student>
                    <student sid = "1102" sex = "女">赵二</student>
                    <student sid = "1103" sex = "女">赵三</student>
                    <student sid = "1104" sex = "男">赵四</student>
                </room>
                <room rid="2" name="二班">
                    <student sid = "1201" sex = "女">钱一</student>
                    <student sid = "1202" sex = "男">钱二</student>
                    <student sid = "1203" sex = "男">钱三</student>
                </room>
            </grade>
            <grade id="2" name="二年级">
                <room rid="1" name="一班">
                    <student sid = "2101" sex = "男">孙一</student>
                   
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值