How to generate a Gramps xml file outside of Gramps?

There are some misperceptions in this argument.

First, there are already a few external applications in existence that use Gramps XML format.

Next, being an extensible and chunky format, the .gramps files can be enrichened by external applications for purposes beyond Gramps’ scope.

In the specific case of GetMyAncestors, a plumber’s nightmare Gramplet could create a wrapper for an un-forked GetMyAncestors. The Gramplet installer could include the entire External tool & dependencies. (To eliminate the installation woes.) It would require layering a GUI on top of their CLI functionality and some double-piping for the data. (Their GEDCOM output into a cache folder, which is sucked in through a preconfigured GEDCOM import)

Plumber’s Nightmares have a tendency to back up and spill sewage everywhere. So you’d want to run it with a blank Tree and then import the resulting .gramps into your main Tree. (So a bucket brigade along with that double-piping.)