It depends... Do you mean simple in the sense of performance? Well, who says that your existing XML file has to be treated as such (parsed and validated)? Seek to the end of the file, before the </a>, add another <b>...</b></a> sequence and done. But I guess, you want a little bit more than that...and a little bit more robustness?
The previous suggestion is simple to program, but surely not the fastest way to append a node to a (potentially large) file. | [reply] [d/l] [select] |
i think i could do with that, my xml files would only contain two to max 3 child nodes. each one added one at a time.
So i guess I could use this approach. Which is not the best approach considering robustness, but again, simplicity is the requirement...
however, it would be nice to learn how to do it in a more robust way esply since I have another task on hand where have more than 200 nodes.
| [reply] |