To register a query, you must set the options (you may optionally also bind values). You must also fetch the XML, then close.
When you getch the XML, the XML may be generated as DOM or as a string.