XQuery tag case function?
723980Dec 1 2011 — edited Dec 14 2011Hi,
We are currently using DBMS_XMLQUERY to build XML files from a complex, nested object type we have created. Unfortunately, it seems that DBMS_XMLQUERY is not the preferred way to do so, the Oracle 11g XML developer's guide points that we should use DBMS_XMLGEN instead. That's not an alternative, as it seems like XMLGEN lacks the "setTagCase" function of XMLQUERY and the resulting XML doc gets all it's tags in caps, which apparently is a big no-no.
I've been toying with XQuery today to see if it can work as an alternative, but I'm stuck at the same point. I can't seem to find any way of having the tag names in lower case. I've tried with fn:lower-case, but it sets the case for the entire content of the object, not just the tags (besides, it doesn't even seem to work with my object type...it sets the values in lower case AND removes the tags, go figure). I can't find any answer to this anywhere. Anybody know some easy way to do it?
This is the query I'm using:
select xmlquery (
'for $j in 1 return
( for $i in ora:view("TAB_OBJ_INMVAL") /ROW
return (<something>{$i/COL_OBJX_INMVAL}</something>)
)'
RETURNING CONTENT
)
from dual
/
Thanks!