title: xquery to convert attributes to tags
body: <p>I am learning on Xquery. I have this tag in my XML document.</p>
  
  <pre><code>&lt;element a="1" b="2" c="3" name="testgroupID"&gt;198&lt;/element&gt;
  &lt;element a="11" b="12" c="13" name="testgroupverifyID" binary="hidden"/&gt;
  </code></pre>
  
  <p>May I know how to create something like the following with xquery? </p>
  
  <pre><code>&lt;mytags&gt;
      &lt;a&gt;1&lt;/a&gt;
      &lt;b&gt;2&lt;/b&gt;
      &lt;c&gt;3&lt;/c&gt;
      &lt;name&gt;testgroupID&lt;/name&gt;
      &lt;value&gt;198&lt;/value&gt;
  &lt;/mytags&gt;
  &lt;mytags&gt;
      &lt;a&gt;11&lt;/a&gt;
      &lt;b&gt;12&lt;/b&gt;
      &lt;c&gt;13&lt;/c&gt;
      &lt;name&gt;testgroupverifyID&lt;/name&gt;
      &lt;binary&gt;hidden&lt;/binary&gt;
  &lt;/mytags&gt;
  </code></pre>
  
  <p>Currently I could only use the static way to do it, like:</p>
  
  <p>$tag := $x/@a
  and then return it with {$tag</p>
  
  <p>Kindly advise. Thank you very much.</p>