XML : How to select an attribute by a variable in xquery?

I know how to select an attribute like so:

  $table/@id    

However how do I do this if the attribute name is stored as a variable. For example:

  let $x = "id"  $table/@[$x]    

No comments:

Post a Comment