Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Is there a way of getting an element name in XQuery?I want to take an element name and use it as the value of an attribute.For example to convertSmithtoSmith
HelloThere is a way of getting the element Tag name with an XQuery using the function “local-name” with input of the node.For example (in your case with node:surname):** Attention this updates your DB updatefor $x in input()/surnamedo insert attribute label {local-name($x)} into $x For testing reasons it is better to use **for $x in input()/surnamereturn{attribute label {local-name($x)}}{$x/@*}{$x/node()}kind regards
Thanks Scholz - that was the answer I was looking for.Kind regards,David Sanders