How can I write (edit) from code some of the attributes in xml document?If you are referring to your .config file, then it should not be written to
because it might be stored on a CD or when you run in a protected
invironment, anything stored under the "Program Files" folder is in that
case read-only.
It is only intended for startup conditions and filled in by the developer
and distributor.
If you wish to save user settings then you should create another xml file in
the users folder yourself.