这是需要我们查询的输入XML文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<? xml version = "1.0" ?> < cars > < supercars company = "Ferrari" > < carname type = "formula one" >Ferarri 101</ carname > < carname type = "sports car" >Ferarri 201</ carname > < carname type = "sports car" >Ferarri 301</ carname > </ supercars > < supercars company = "Lamborgini" > < carname >Lamborgini 001</ carname > < carname >Lamborgini 002</ carname > < carname >Lamborgini 003</ carname > </ supercars > < luxurycars company = "Benteley" > < carname >Benteley 1</ carname > < carname >Benteley 2</ carname > < carname >Benteley 3</ carname > </ luxurycars > </ cars > |
演示示例: