To add to Andy's comment, for our upcoming 2.1.0 Community release, we intend to provide support for this capability in our WCM module. With 2.1.0, our target is to provide a pre-built extractor that, based on some identified list of XML elements configured via a config file, will take those individual elements and set them as atttributes. With 2.1.0 then, as Andy noted, you will then be able to execute the type of queried you asked for.
2.1.0 ships as Community release end of month. This capability, I should note, is a non-stop ship item. This means that there is the possibility that this feature will not make it, should complications arise with our major feature commits. We will keep you updated on progress, and the release, so stay tuned.
Kevin