有一个名称为ABC的XML文件,结构如下
<?xml version=\"1.0\" ?>
<img src="images/01.jpg" width="200" height="200" />
<img src="images/02.jpg" width="200" height="200" />
<img src="images/03.jpg" width="200" height="200" />我现在想在这个基础上开始增加.<?xml version=\"1.0\" ?>
<img src="images/01.jpg" width="200" height="200" />
<img src="images/02.jpg" width="200" height="200" />
<img src="images/03.jpg" width="200" height="200" />
<img src="images/04.jpg" width="200" height="200" />
<img src="images/05.jpg" width="200" height="200" />
...在程序里应该怎么写?
<?xml version=\"1.0\" ?>
<img src="images/01.jpg" width="200" height="200" />
<img src="images/02.jpg" width="200" height="200" />
<img src="images/03.jpg" width="200" height="200" />我现在想在这个基础上开始增加.<?xml version=\"1.0\" ?>
<img src="images/01.jpg" width="200" height="200" />
<img src="images/02.jpg" width="200" height="200" />
<img src="images/03.jpg" width="200" height="200" />
<img src="images/04.jpg" width="200" height="200" />
<img src="images/05.jpg" width="200" height="200" />
...在程序里应该怎么写?
参与一下streamwrite类。
一个根节点,然后根节点里才是子节点,一个xml文档有仅有一个根根点。
就象下面的<?xml version="1.0"?>
<root>
<img src="images/01.jpg" width="200" height="200" />
<img src="images/02.jpg" width="200" height="200" />
<img src="images/03.jpg" width="200" height="200" />
</root>