From: Seebs Date: 2010-01-17T17:40:06+09:00 Subject: Re: How can I modify the xml file directly? On 2010-01-17, Milo Luo wrote: > Do you mean it's related with the file system API? Yes. > If it can located or got the node & text from XML, it should be modified > the node or text value without too many problems. Not in general. The problem is that, unless the new value is the same length as the old value, modifying text in the middle of the file produces problems. Imagine that we have a really simple XML file: hello, world You want to change that to "hello, world!". So you do. And you get: hello, world!/greet> See the problem? You can't make the later parts of the file move ahead; you would actually have to rewrite the whole file. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!