There's never any reason to write (or read) the XML directly.
See here for what it's good food:
[How to use buttons and scripts from this forum)