The xml plugin only reads xml, it doesn't write.
To write you'll need to either make your own writer or try to utilize some javascript library to do it.
You can look here for the xml file format:
https://en.wikipedia.org/wiki/XML
So basically the best way to append data to an xml file is to load it with ajax or with nwjs, store it in a variable, then just add text to the end.
As an example, if you have a file called "animal.xml" added to your project you can load it, append data to it, and finally download it with this:
start of layout
--- ajax: request animal.xml
global text xml=""
ajax: on loaded
--- set xml to ajax.lastdata
--- add "<fish>tuna</fish>" to xml
--- browser: invoke download of xml