这是我们需要修改的输入XML文件:

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<cars>
   <supercars company="Ferrari">
      <carname type="formula one">Ferrari 101</carname>
      <carname type="sports">Ferrari 202</carname>
   </supercars>
   <luxurycars company="Benteley">
      <carname>Benteley 1</carname>
      <carname>Benteley 2</carname>
      <carname>Benteley 3</carname>
   </luxurycars>
</cars>

 

演示示例:

ModifyXmlFileDemo.java

 

 点击链接查看详细内容 
posted on 2017-08-10 10:18  SXT  阅读(160)  评论(0编辑  收藏  举报