what is the simpler way to generate a rowset...row xml structure with a normal, static query?



Platform: Oracle 10.2.0.3 SE/Linux

I know that using DBMS_XMLGEN I can get query results in a ROWSET..ROW
XML structure but I have to feed it with a dynamic SQL string or a ref
cursor.

What is the simpler way to generate a ROWSET..ROW XML structure with a
normal, static query?

My best shot is:

select
xmlElement (
"ROWSET",
xmlAgg (
xmlElement (
"ROW",
xmlForest (
first_name,
last_name,
email
)
)
)
)
from
employees
where
manager_id=100
order by
last_name
;

Is there a simpler way? I tried with SYS_XMLGEN but I'm not able to make
it work with more than one column.

Thank you. Kind regards, C.
.



Relevant Pages

  • Re: XPath question
    ... You can abstract the XML structure a little more by creating a structure ... You can then query for the node you desire with a similar XPath query: ... This XPath query can be plugged into the SelectSingleNode method because it ... > What syntax can I use to return the node containing Value3? ...
    (microsoft.public.sqlserver.xml)
  • Re: XML / XSLT / Tcl-Procs
    ... control if I want to query the XML structure for specific things before ... Prev by Date: ...
    (comp.lang.tcl)
  • Re: xml - write to browser
    ... default browser. ... Do I need to traverse the xml structure (info ... xmlelement) myself or is there a standard api that does this for me? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: xml - write to browser
    ... default browser. ... Do I need to traverse the xml structure (info ... xmlelement) myself or is there a standard api that does this for me? ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: retrieving xml value
    ... "Asha" wrote: ... > below is my xml structure, how can I use Xquery to query for a specific ...
    (microsoft.public.dotnet.framework.aspnet)