views:

59

answers:

0

I use QT xmlpatterns in XQuery mode to implement templates. The template is an QXmlQuery object and the variables are filled-in using bindVariable(). So far the variables were strings and everything worked fine.

Now, I want to inser preformated chunks of XML into the template. I would like to create a piece of xml in C++ using QXmlStreamWriter and bind the result to an external variable for example $var. Then, in xquery do something like

element block {
  $var
}

Is this possible to do? Any trick?