如下XML,需要用DOM解析,输出上图信息,求指教 <?xml version="1.0" encoding="utf-8"?> <root name="石牌街道"> <juwei name="瑞华居委"> <jianzhu name="瑞华花园1栋"> <fjname ID="1">101室</fjname> <fjname ID="2">102室</fjname> </jianzhu> <jianzhu name="瑞华花园2栋"> <fjname ID="3">101室</fjname> <fjname ID="4">102室</fjname> </jianzhu> </juwei> <juwei name="金帝居委"> <jianzhu name="金帝花园1栋"> <fjname ID="5">101室</fjname> <fjname ID="6">102室</fjname> </jianzhu> </juwei> <juwei name="朝阳居委"> <jianzhu name="假日花园1栋"> <fjname ID="7">101室</fjname> <fjname ID="8">102室</fjname> </jianzhu> </juwei> </root>
相关分类