Hello, does anybody have any examples on where they are using parameter values to query for existence of a node based on a node name that is passed in. I have been able to get the below to work, however, the performance is subpar as you would imagine from having to cycle through the entire xml tree and running the condition across the node name.
IF XMLEXISTS('$c//(*, @*)[local-name()=$n]' PASSING @p_XmlFile AS "c",
@p_NodeName AS "n")
I have read somewhere that it might be possible to turn a string literal into a path expression but have not been able to replicate that for db2.