They can't run at the same time. They'll have to run one after the other - if you call them from one global script.
What you can do is have javascript open two new windows, one that runs the XML script, and the other that runs the add/delete/etc functions. It still won't be run at the same time, but it will appear so.