<?xml version="1.0" encoding="UTF-8"?>
<students>
<class id="st58">
<student>Jack1</student>
<student>Jack2</student>
<student>Jack3</student>
<student>Jack4</student>
</class>
<class id="st59">
<student>Tom1</student>
<student>Tom2</student>
<student>Tom3</student>
<student>Tom4</student>
</class>
<class id="st60">
<student>Mack1</student>
<student>Mack2</student>
<student>Mack3</student>
<student>Mack4</student>
</class>
</students>
如上:用DOM解析XML的时候,怎么用相应的id属性得到对应的student节点
相关分类