1 of 1 people found this helpful
The document API is pretty limited right now. The things it can do are listed here:
...and "your" functionality isn't in said list. You'll still need to some sort of "custom" work which parses the XML and finds / returns the SQL for you. Not impossible, but not a whole lot of fun, either.
I started parsing the XML and yeah, it's not fun. Just wanted to check that I wasn't missing something easier. Thanks!