能否通过程序修改标签名称,大家帮忙看看

如有这样的xml 文档
<?xml version="1.0" encoding="GB2312" ?>
- <root>
root text
<author name="James" location="UK">James Strachan</author>
<author name="Bob" location="US">Bob McWhirter</author>
</root>

怎样通过代码修改<root>为<newroot>标签
修改后的文档应该是这样的
<?xml version="1.0" encoding="GB2312" ?>
- <newroot>
root text
<author name="James" location="UK">James Strachan</author>
<author name="Bob" location="US">Bob McWhirter</author>
</newroot>

[619 byte] By [xkjftj] at [2008-1-6]
# 1
没人?自己顶
xkjftj at 2007-10-21 > top of Msdn China Tech,Java,J2SE,扩展类...
# 2
当然可以自己改
你可以用正则表示式先找到要改的地方,然后替换,然后再重新写入文件不就可以了吗
lbfhappy-千里冰封 at 2007-10-21 > top of Msdn China Tech,Java,J2SE,扩展类...