For more info, see the following:
There is also an element you can add to the the Xml fragment to to restrict the results to one folder - the "Folders" element. For more details, see:
For example, to recursively get all documents in folder a folder named "Folder 10", your Xml fragment would be
"<queryoptions><viewattributes scope="\"><folder>Folder 10</folder></queryoptions>"
Another article I found useful on recursively enumerating folder contents is at: